--- old/src/java.base/share/classes/com/sun/crypto/provider/DESCrypt.java 2018-09-28 11:25:42.569908797 +0700
+++ new/src/java.base/share/classes/com/sun/crypto/provider/DESCrypt.java 2018-09-28 11:25:42.149908797 +0700
@@ -40,7 +40,7 @@
*/
class DESCrypt extends SymmetricCipher implements DESConstants {
- private static final int s0p[] = {
+ private static final int[] s0p = {
0x00410100, 0x00010000, 0x40400000, 0x40410100, 0x00400000,
0x40010100, 0x40010000, 0x40400000, 0x40010100, 0x00410100,
0x00410000, 0x40000100, 0x40400100, 0x00400000, 0x00000000,
@@ -56,7 +56,7 @@
0x40000000, 0x40410000, 0x00000100, 0x40010100,
};
- private static final int s1p[] = {
+ private static final int[] s1p = {
0x08021002, 0x00000000, 0x00021000, 0x08020000, 0x08000002,
0x00001002, 0x08001000, 0x00021000, 0x00001000, 0x08020002,
0x00000002, 0x08001000, 0x00020002, 0x08021000, 0x08020000,
@@ -72,7 +72,7 @@
0x08001002, 0x00000002, 0x08020000, 0x00021000,
};
- private static final int s2p[] = {
+ private static final int[] s2p = {
0x20800000, 0x00808020, 0x00000020, 0x20800020, 0x20008000,
0x00800000, 0x20800020, 0x00008020, 0x00800020, 0x00008000,
0x00808000, 0x20000000, 0x20808020, 0x20000020, 0x20000000,
@@ -88,7 +88,7 @@
0x20800000, 0x20008020, 0x00000020, 0x00808000,
};
- private static final int s3p[] = {
+ private static final int[] s3p = {
0x00080201, 0x02000200, 0x00000001, 0x02080201, 0x00000000,
0x02080000, 0x02000201, 0x00080001, 0x02080200, 0x02000001,
0x02000000, 0x00000201, 0x02000001, 0x00080201, 0x00080000,
@@ -104,7 +104,7 @@
0x00000201, 0x02000000, 0x02000001, 0x02080200,
};
- private static final int s4p[] = {
+ private static final int[] s4p = {
0x01000000, 0x00002000, 0x00000080, 0x01002084, 0x01002004,
0x01000080, 0x00002084, 0x01002000, 0x00002000, 0x00000004,
0x01000004, 0x00002080, 0x01000084, 0x01002004, 0x01002080,
@@ -120,7 +120,7 @@
0x00000004, 0x00002084, 0x01002000, 0x01000004,
};
- private static final int s5p[] = {
+ private static final int[] s5p = {
0x10000008, 0x00040008, 0x00000000, 0x10040400, 0x00040008,
0x00000400, 0x10000408, 0x00040000, 0x00000408, 0x10040408,
0x00040400, 0x10000000, 0x10000400, 0x10000008, 0x10040000,
@@ -136,7 +136,7 @@
0x10040000, 0x00000408, 0x00000008, 0x10040008,
};
- private static final int s6p[] = {
+ private static final int[] s6p = {
0x00000800, 0x00000040, 0x00200040, 0x80200000, 0x80200840,
0x80000800, 0x00000840, 0x00000000, 0x00200000, 0x80200040,
0x80000040, 0x00200800, 0x80000000, 0x00200840, 0x00200800,
@@ -152,7 +152,7 @@
0x80200000, 0x00200840, 0x00200800, 0x80000800,
};
- private static final int s7p[] = {
+ private static final int[] s7p = {
0x04100010, 0x04104000, 0x00004010, 0x00000000, 0x04004000,
0x00100010, 0x04100000, 0x04104010, 0x00000010, 0x04000000,
0x00104000, 0x00004010, 0x00104010, 0x04004010, 0x04000010,
@@ -168,112 +168,112 @@
0x04000000, 0x04100010, 0x00004000, 0x00104010,
};
- private static final int permRight0[] = {
+ private static final int[] permRight0 = {
0x00000000, 0x40000000, 0x00400000, 0x40400000, 0x00004000,
0x40004000, 0x00404000, 0x40404000, 0x00000040, 0x40000040,
0x00400040, 0x40400040, 0x00004040, 0x40004040, 0x00404040,
0x40404040,
};
- private static final int permLeft1[] = {
+ private static final int[] permLeft1 = {
0x00000000, 0x40000000, 0x00400000, 0x40400000, 0x00004000,
0x40004000, 0x00404000, 0x40404000, 0x00000040, 0x40000040,
0x00400040, 0x40400040, 0x00004040, 0x40004040, 0x00404040,
0x40404040,
};
- private static final int permRight2[] = {
+ private static final int[] permRight2 = {
0x00000000, 0x10000000, 0x00100000, 0x10100000, 0x00001000,
0x10001000, 0x00101000, 0x10101000, 0x00000010, 0x10000010,
0x00100010, 0x10100010, 0x00001010, 0x10001010, 0x00101010,
0x10101010,
};
- private static final int permLeft3[] = {
+ private static final int[] permLeft3 = {
0x00000000, 0x10000000, 0x00100000, 0x10100000, 0x00001000,
0x10001000, 0x00101000, 0x10101000, 0x00000010, 0x10000010,
0x00100010, 0x10100010, 0x00001010, 0x10001010, 0x00101010,
0x10101010,
};
- private static final int permRight4[] = {
+ private static final int[] permRight4 = {
0x00000000, 0x04000000, 0x00040000, 0x04040000, 0x00000400,
0x04000400, 0x00040400, 0x04040400, 0x00000004, 0x04000004,
0x00040004, 0x04040004, 0x00000404, 0x04000404, 0x00040404,
0x04040404,
};
- private static final int permLeft5[] = {
+ private static final int[] permLeft5 = {
0x00000000, 0x04000000, 0x00040000, 0x04040000, 0x00000400,
0x04000400, 0x00040400, 0x04040400, 0x00000004, 0x04000004,
0x00040004, 0x04040004, 0x00000404, 0x04000404, 0x00040404,
0x04040404,
};
- private static final int permRight6[] = {
+ private static final int[] permRight6 = {
0x00000000, 0x01000000, 0x00010000, 0x01010000, 0x00000100,
0x01000100, 0x00010100, 0x01010100, 0x00000001, 0x01000001,
0x00010001, 0x01010001, 0x00000101, 0x01000101, 0x00010101,
0x01010101,
};
- private static final int permLeft7[] = {
+ private static final int[] permLeft7 = {
0x00000000, 0x01000000, 0x00010000, 0x01010000, 0x00000100,
0x01000100, 0x00010100, 0x01010100, 0x00000001, 0x01000001,
0x00010001, 0x01010001, 0x00000101, 0x01000101, 0x00010101,
0x01010101,
};
- private static final int permRight8[] = {
+ private static final int[] permRight8 = {
0x00000000, 0x80000000, 0x00800000, 0x80800000, 0x00008000,
0x80008000, 0x00808000, 0x80808000, 0x00000080, 0x80000080,
0x00800080, 0x80800080, 0x00008080, 0x80008080, 0x00808080,
0x80808080,
};
- private static final int permLeft9[] = {
+ private static final int[] permLeft9 = {
0x00000000, 0x80000000, 0x00800000, 0x80800000, 0x00008000,
0x80008000, 0x00808000, 0x80808000, 0x00000080, 0x80000080,
0x00800080, 0x80800080, 0x00008080, 0x80008080, 0x00808080,
0x80808080,
};
- private static final int permRightA[] = {
+ private static final int[] permRightA = {
0x00000000, 0x20000000, 0x00200000, 0x20200000, 0x00002000,
0x20002000, 0x00202000, 0x20202000, 0x00000020, 0x20000020,
0x00200020, 0x20200020, 0x00002020, 0x20002020, 0x00202020,
0x20202020,
};
- private static final int permLeftB[] = {
+ private static final int[] permLeftB = {
0x00000000, 0x20000000, 0x00200000, 0x20200000, 0x00002000,
0x20002000, 0x00202000, 0x20202000, 0x00000020, 0x20000020,
0x00200020, 0x20200020, 0x00002020, 0x20002020, 0x00202020,
0x20202020,
};
- private static final int permRightC[] = {
+ private static final int[] permRightC = {
0x00000000, 0x08000000, 0x00080000, 0x08080000, 0x00000800,
0x08000800, 0x00080800, 0x08080800, 0x00000008, 0x08000008,
0x00080008, 0x08080008, 0x00000808, 0x08000808, 0x00080808,
0x08080808,
};
- private static final int permLeftD[] = {
+ private static final int[] permLeftD = {
0x00000000, 0x08000000, 0x00080000, 0x08080000, 0x00000800,
0x08000800, 0x00080800, 0x08080800, 0x00000008, 0x08000008,
0x00080008, 0x08080008, 0x00000808, 0x08000808, 0x00080808,
0x08080808,
};
- private static final int permRightE[] = {
+ private static final int[] permRightE = {
0x00000000, 0x02000000, 0x00020000, 0x02020000, 0x00000200,
0x02000200, 0x00020200, 0x02020200, 0x00000002, 0x02000002,
0x00020002, 0x02020002, 0x00000202, 0x02000202, 0x00020202,
0x02020202,
};
- private static final int permLeftF[] = {
+ private static final int[] permLeftF = {
0x00000000, 0x02000000, 0x00020000, 0x02020000, 0x00000200,
0x02000200, 0x00020200, 0x02020200, 0x00000002, 0x02000002,
0x00020002, 0x02020002, 0x00000202, 0x02000202, 0x00020202,
@@ -283,224 +283,224 @@
/*
* Initial Permutation
*/
- private static final int initPermLeft0[] = {
+ private static final int[] initPermLeft0 = {
0x00000000, 0x00008000, 0x00000000, 0x00008000, 0x00000080,
0x00008080, 0x00000080, 0x00008080, 0x00000000, 0x00008000,
0x00000000, 0x00008000, 0x00000080, 0x00008080, 0x00000080,
0x00008080,
};
- private static final int initPermRight0[] = {
+ private static final int[] initPermRight0 = {
0x00000000, 0x00000000, 0x00008000, 0x00008000, 0x00000000,
0x00000000, 0x00008000, 0x00008000, 0x00000080, 0x00000080,
0x00008080, 0x00008080, 0x00000080, 0x00000080, 0x00008080,
0x00008080,
};
- private static final int initPermLeft1[] = {
+ private static final int[] initPermLeft1 = {
0x00000000, 0x80000000, 0x00000000, 0x80000000, 0x00800000,
0x80800000, 0x00800000, 0x80800000, 0x00000000, 0x80000000,
0x00000000, 0x80000000, 0x00800000, 0x80800000, 0x00800000,
0x80800000,
};
- private static final int initPermRight1[] = {
+ private static final int[] initPermRight1 = {
0x00000000, 0x00000000, 0x80000000, 0x80000000, 0x00000000,
0x00000000, 0x80000000, 0x80000000, 0x00800000, 0x00800000,
0x80800000, 0x80800000, 0x00800000, 0x00800000, 0x80800000,
0x80800000,
};
- private static final int initPermLeft2[] = {
+ private static final int[] initPermLeft2 = {
0x00000000, 0x00004000, 0x00000000, 0x00004000, 0x00000040,
0x00004040, 0x00000040, 0x00004040, 0x00000000, 0x00004000,
0x00000000, 0x00004000, 0x00000040, 0x00004040, 0x00000040,
0x00004040,
};
- private static final int initPermRight2[] = {
+ private static final int[] initPermRight2 = {
0x00000000, 0x00000000, 0x00004000, 0x00004000, 0x00000000,
0x00000000, 0x00004000, 0x00004000, 0x00000040, 0x00000040,
0x00004040, 0x00004040, 0x00000040, 0x00000040, 0x00004040,
0x00004040,
};
- private static final int initPermLeft3[] = {
+ private static final int[] initPermLeft3 = {
0x00000000, 0x40000000, 0x00000000, 0x40000000, 0x00400000,
0x40400000, 0x00400000, 0x40400000, 0x00000000, 0x40000000,
0x00000000, 0x40000000, 0x00400000, 0x40400000, 0x00400000,
0x40400000,
};
- private static final int initPermRight3[] = {
+ private static final int[] initPermRight3 = {
0x00000000, 0x00000000, 0x40000000, 0x40000000, 0x00000000,
0x00000000, 0x40000000, 0x40000000, 0x00400000, 0x00400000,
0x40400000, 0x40400000, 0x00400000, 0x00400000, 0x40400000,
0x40400000,
};
- private static final int initPermLeft4[] = {
+ private static final int[] initPermLeft4 = {
0x00000000, 0x00002000, 0x00000000, 0x00002000, 0x00000020,
0x00002020, 0x00000020, 0x00002020, 0x00000000, 0x00002000,
0x00000000, 0x00002000, 0x00000020, 0x00002020, 0x00000020,
0x00002020,
};
- private static final int initPermRight4[] = {
+ private static final int[] initPermRight4 = {
0x00000000, 0x00000000, 0x00002000, 0x00002000, 0x00000000,
0x00000000, 0x00002000, 0x00002000, 0x00000020, 0x00000020,
0x00002020, 0x00002020, 0x00000020, 0x00000020, 0x00002020,
0x00002020,
};
- private static final int initPermLeft5[] = {
+ private static final int[] initPermLeft5 = {
0x00000000, 0x20000000, 0x00000000, 0x20000000, 0x00200000,
0x20200000, 0x00200000, 0x20200000, 0x00000000, 0x20000000,
0x00000000, 0x20000000, 0x00200000, 0x20200000, 0x00200000,
0x20200000,
};
- private static final int initPermRight5[] = {
+ private static final int[] initPermRight5 = {
0x00000000, 0x00000000, 0x20000000, 0x20000000, 0x00000000,
0x00000000, 0x20000000, 0x20000000, 0x00200000, 0x00200000,
0x20200000, 0x20200000, 0x00200000, 0x00200000, 0x20200000,
0x20200000,
};
- private static final int initPermLeft6[] = {
+ private static final int[] initPermLeft6 = {
0x00000000, 0x00001000, 0x00000000, 0x00001000, 0x00000010,
0x00001010, 0x00000010, 0x00001010, 0x00000000, 0x00001000,
0x00000000, 0x00001000, 0x00000010, 0x00001010, 0x00000010,
0x00001010,
};
- private static final int initPermRight6[] = {
+ private static final int[] initPermRight6 = {
0x00000000, 0x00000000, 0x00001000, 0x00001000, 0x00000000,
0x00000000, 0x00001000, 0x00001000, 0x00000010, 0x00000010,
0x00001010, 0x00001010, 0x00000010, 0x00000010, 0x00001010,
0x00001010,
};
- private static final int initPermLeft7[] = {
+ private static final int[] initPermLeft7 = {
0x00000000, 0x10000000, 0x00000000, 0x10000000, 0x00100000,
0x10100000, 0x00100000, 0x10100000, 0x00000000, 0x10000000,
0x00000000, 0x10000000, 0x00100000, 0x10100000, 0x00100000,
0x10100000,
};
- private static final int initPermRight7[] = {
+ private static final int[] initPermRight7 = {
0x00000000, 0x00000000, 0x10000000, 0x10000000, 0x00000000,
0x00000000, 0x10000000, 0x10000000, 0x00100000, 0x00100000,
0x10100000, 0x10100000, 0x00100000, 0x00100000, 0x10100000,
0x10100000,
};
- private static final int initPermLeft8[] = {
+ private static final int[] initPermLeft8 = {
0x00000000, 0x00000800, 0x00000000, 0x00000800, 0x00000008,
0x00000808, 0x00000008, 0x00000808, 0x00000000, 0x00000800,
0x00000000, 0x00000800, 0x00000008, 0x00000808, 0x00000008,
0x00000808,
};
- private static final int initPermRight8[] = {
+ private static final int[] initPermRight8 = {
0x00000000, 0x00000000, 0x00000800, 0x00000800, 0x00000000,
0x00000000, 0x00000800, 0x00000800, 0x00000008, 0x00000008,
0x00000808, 0x00000808, 0x00000008, 0x00000008, 0x00000808,
0x00000808,
};
- private static final int initPermLeft9[] = {
+ private static final int[] initPermLeft9 = {
0x00000000, 0x08000000, 0x00000000, 0x08000000, 0x00080000,
0x08080000, 0x00080000, 0x08080000, 0x00000000, 0x08000000,
0x00000000, 0x08000000, 0x00080000, 0x08080000, 0x00080000,
0x08080000,
};
- private static final int initPermRight9[] = {
+ private static final int[] initPermRight9 = {
0x00000000, 0x00000000, 0x08000000, 0x08000000, 0x00000000,
0x00000000, 0x08000000, 0x08000000, 0x00080000, 0x00080000,
0x08080000, 0x08080000, 0x00080000, 0x00080000, 0x08080000,
0x08080000,
};
- private static final int initPermLeftA[] = {
+ private static final int[] initPermLeftA = {
0x00000000, 0x00000400, 0x00000000, 0x00000400, 0x00000004,
0x00000404, 0x00000004, 0x00000404, 0x00000000, 0x00000400,
0x00000000, 0x00000400, 0x00000004, 0x00000404, 0x00000004,
0x00000404,
};
- private static final int initPermRightA[] = {
+ private static final int[] initPermRightA = {
0x00000000, 0x00000000, 0x00000400, 0x00000400, 0x00000000,
0x00000000, 0x00000400, 0x00000400, 0x00000004, 0x00000004,
0x00000404, 0x00000404, 0x00000004, 0x00000004, 0x00000404,
0x00000404,
};
- private static final int initPermLeftB[] = {
+ private static final int[] initPermLeftB = {
0x00000000, 0x04000000, 0x00000000, 0x04000000, 0x00040000,
0x04040000, 0x00040000, 0x04040000, 0x00000000, 0x04000000,
0x00000000, 0x04000000, 0x00040000, 0x04040000, 0x00040000,
0x04040000,
};
- private static final int initPermRightB[] = {
+ private static final int[] initPermRightB = {
0x00000000, 0x00000000, 0x04000000, 0x04000000, 0x00000000,
0x00000000, 0x04000000, 0x04000000, 0x00040000, 0x00040000,
0x04040000, 0x04040000, 0x00040000, 0x00040000, 0x04040000,
0x04040000,
};
- private static final int initPermLeftC[] = {
+ private static final int[] initPermLeftC = {
0x00000000, 0x00000200, 0x00000000, 0x00000200, 0x00000002,
0x00000202, 0x00000002, 0x00000202, 0x00000000, 0x00000200,
0x00000000, 0x00000200, 0x00000002, 0x00000202, 0x00000002,
0x00000202,
};
- private static final int initPermRightC[] = {
+ private static final int[] initPermRightC = {
0x00000000, 0x00000000, 0x00000200, 0x00000200, 0x00000000,
0x00000000, 0x00000200, 0x00000200, 0x00000002, 0x00000002,
0x00000202, 0x00000202, 0x00000002, 0x00000002, 0x00000202,
0x00000202,
};
- private static final int initPermLeftD[] = {
+ private static final int[] initPermLeftD = {
0x00000000, 0x02000000, 0x00000000, 0x02000000, 0x00020000,
0x02020000, 0x00020000, 0x02020000, 0x00000000, 0x02000000,
0x00000000, 0x02000000, 0x00020000, 0x02020000, 0x00020000,
0x02020000,
};
- private static final int initPermRightD[] = {
+ private static final int[] initPermRightD = {
0x00000000, 0x00000000, 0x02000000, 0x02000000, 0x00000000,
0x00000000, 0x02000000, 0x02000000, 0x00020000, 0x00020000,
0x02020000, 0x02020000, 0x00020000, 0x00020000, 0x02020000,
0x02020000,
};
- private static final int initPermLeftE[] = {
+ private static final int[] initPermLeftE = {
0x00000000, 0x00000100, 0x00000000, 0x00000100, 0x00000001,
0x00000101, 0x00000001, 0x00000101, 0x00000000, 0x00000100,
0x00000000, 0x00000100, 0x00000001, 0x00000101, 0x00000001,
0x00000101,
};
- private static final int initPermRightE[] = {
+ private static final int[] initPermRightE = {
0x00000000, 0x00000000, 0x00000100, 0x00000100, 0x00000000,
0x00000000, 0x00000100, 0x00000100, 0x00000001, 0x00000001,
0x00000101, 0x00000101, 0x00000001, 0x00000001, 0x00000101,
0x00000101,
};
- private static final int initPermLeftF[] = {
+ private static final int[] initPermLeftF = {
0x00000000, 0x01000000, 0x00000000, 0x01000000, 0x00010000,
0x01010000, 0x00010000, 0x01010000, 0x00000000, 0x01000000,
0x00000000, 0x01000000, 0x00010000, 0x01010000, 0x00010000,
0x01010000,
};
- private static final int initPermRightF[] = {
+ private static final int[] initPermRightF = {
0x00000000, 0x00000000, 0x01000000, 0x01000000, 0x00000000,
0x00000000, 0x01000000, 0x01000000, 0x00010000, 0x00010000,
0x01010000, 0x01010000, 0x00010000, 0x00010000, 0x01010000,
@@ -594,7 +594,7 @@
void cipherBlock(byte[] in, int inOffset, byte[] out, int outOffset) {
- byte key[];
+ byte[] key;
int temp;
int i, j;
int offset;
@@ -646,7 +646,7 @@
}
private static void perm(int left, int right,
- byte out[], int offset) {
+ byte[] out, int offset) {
int low, high, temp;
temp = left;
@@ -695,7 +695,7 @@
}
- private static int initialPermutationLeft(byte block[], int offset) {
+ private static int initialPermutationLeft(byte[] block, int offset) {
int l;
l = initPermLeft1[block[offset] & 0xf];
@@ -717,7 +717,7 @@
return l;
}
- private static int initialPermutationRight(byte block[], int offset) {
+ private static int initialPermutationRight(byte[] block, int offset) {
int l;
l = initPermRight1[block[offset] & 0xf];
@@ -739,9 +739,9 @@
return l;
}
- void expandKey(byte key[]) {
+ void expandKey(byte[] key) {
int octet;
- byte ek[] = new byte[128];
+ byte[] ek = new byte[128];
octet = key[0];
if ((octet & 0x80) != 0) {
--- old/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java 2018-09-28 11:25:44.273908797 +0700
+++ new/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java 2018-09-28 11:25:43.829908797 +0700
@@ -71,7 +71,7 @@
// the private-value length (optional)
private int l;
- private int DH_data[] = { 1, 2, 840, 113549, 1, 3, 1 };
+ private int[] DH_data = { 1, 2, 840, 113549, 1, 3, 1 };
/**
* Make a DH private key out of a private value x
, a prime
--- old/src/java.base/share/classes/com/sun/crypto/provider/DHPublicKey.java 2018-09-28 11:25:45.833908797 +0700
+++ new/src/java.base/share/classes/com/sun/crypto/provider/DHPublicKey.java 2018-09-28 11:25:45.385908797 +0700
@@ -68,7 +68,7 @@
// the private-value length (optional)
private int l;
- private int DH_data[] = { 1, 2, 840, 113549, 1, 3, 1 };
+ private int[] DH_data = { 1, 2, 840, 113549, 1, 3, 1 };
/**
* Make a DH public key out of a public value y
, a prime
--- old/src/java.base/share/classes/com/sun/crypto/provider/HmacCore.java 2018-09-28 11:25:47.717908797 +0700
+++ new/src/java.base/share/classes/com/sun/crypto/provider/HmacCore.java 2018-09-28 11:25:47.161908797 +0700
@@ -174,7 +174,7 @@
* @param offset the offset in input
where the input starts.
* @param len the number of bytes to process.
*/
- protected void engineUpdate(byte input[], int offset, int len) {
+ protected void engineUpdate(byte[] input, int offset, int len) {
if (first == true) {
// compute digest for 1st pass; start with inner pad
md.update(k_ipad);
--- old/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java 2018-09-28 11:25:48.989908797 +0700
+++ new/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java 2018-09-28 11:25:48.593908797 +0700
@@ -68,7 +68,7 @@
private static final class PrivateKeyEntry {
Date date; // the creation date of this entry
byte[] protectedKey;
- Certificate chain[];
+ Certificate[] chain;
};
// Secret key
@@ -639,7 +639,7 @@
* the keystore (such as deleting or modifying key or
* certificate entries).
*/
- byte digest[] = md.digest();
+ byte[] digest = md.digest();
dos.write(digest);
dos.flush();
@@ -868,7 +868,7 @@
* with
*/
if (password != null) {
- byte computed[], actual[];
+ byte[] computed;byte[] actual;
computed = md.digest();
actual = new byte[computed.length];
dis.readFully(actual);
--- old/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java 2018-09-28 11:25:50.317908797 +0700
+++ new/src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java 2018-09-28 11:25:49.925908797 +0700
@@ -94,25 +94,25 @@
abstract class PBES2Parameters extends AlgorithmParametersSpi {
- private static final int pkcs5PBKDF2[] =
+ private static final int[] pkcs5PBKDF2 =
{1, 2, 840, 113549, 1, 5, 12};
- private static final int pkcs5PBES2[] =
+ private static final int[] pkcs5PBES2 =
{1, 2, 840, 113549, 1, 5, 13};
- private static final int hmacWithSHA1[] =
+ private static final int[] hmacWithSHA1 =
{1, 2, 840, 113549, 2, 7};
- private static final int hmacWithSHA224[] =
+ private static final int[] hmacWithSHA224 =
{1, 2, 840, 113549, 2, 8};
- private static final int hmacWithSHA256[] =
+ private static final int[] hmacWithSHA256 =
{1, 2, 840, 113549, 2, 9};
- private static final int hmacWithSHA384[] =
+ private static final int[] hmacWithSHA384 =
{1, 2, 840, 113549, 2, 10};
- private static final int hmacWithSHA512[] =
+ private static final int[] hmacWithSHA512 =
{1, 2, 840, 113549, 2, 11};
- private static final int aes128CBC[] =
+ private static final int[] aes128CBC =
{2, 16, 840, 1, 101, 3, 4, 1, 2};
- private static final int aes192CBC[] =
+ private static final int[] aes192CBC =
{2, 16, 840, 1, 101, 3, 4, 1, 22};
- private static final int aes256CBC[] =
+ private static final int[] aes256CBC =
{2, 16, 840, 1, 101, 3, 4, 1, 42};
private static ObjectIdentifier pkcs5PBKDF2_OID;
--- old/src/java.base/share/classes/com/sun/crypto/provider/SslMacCore.java 2018-09-28 11:25:51.925908797 +0700
+++ new/src/java.base/share/classes/com/sun/crypto/provider/SslMacCore.java 2018-09-28 11:25:51.509908797 +0700
@@ -128,7 +128,7 @@
* @param offset the offset in input
where the input starts.
* @param len the number of bytes to process.
*/
- void update(byte input[], int offset, int len) {
+ void update(byte[] input, int offset, int len) {
if (first == true) {
// compute digest for 1st pass; start with inner pad
md.update(secret);
@@ -211,7 +211,7 @@
protected void engineUpdate(byte input) {
core.update(input);
}
- protected void engineUpdate(byte input[], int offset, int len) {
+ protected void engineUpdate(byte[] input, int offset, int len) {
core.update(input, offset, len);
}
protected void engineUpdate(ByteBuffer input) {
@@ -244,7 +244,7 @@
protected void engineUpdate(byte input) {
core.update(input);
}
- protected void engineUpdate(byte input[], int offset, int len) {
+ protected void engineUpdate(byte[] input, int offset, int len) {
core.update(input, offset, len);
}
protected void engineUpdate(ByteBuffer input) {
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/AdaptiveCoding.java 2018-09-28 11:25:53.461908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/AdaptiveCoding.java 2018-09-28 11:25:53.049908797 +0700
@@ -204,7 +204,7 @@
break;
}
}
- public static int parseMetaCoding(byte[] bytes, int pos, Coding dflt, CodingMethod res[]) {
+ public static int parseMetaCoding(byte[] bytes, int pos, Coding dflt, CodingMethod[] res) {
int op = bytes[pos++] & 0xFF;
if (op < _meta_run || op >= _meta_pop) return pos-1; // backup
AdaptiveCoding prevc = null;
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/Attribute.java 2018-09-28 11:25:55.021908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/Attribute.java 2018-09-28 11:25:54.601908797 +0700
@@ -228,7 +228,7 @@
// pack.attribute.method.AnnotationDefault=[TB...]
static {
- String mdLayouts[] = {
+ String[] mdLayouts = {
Attribute.normalizeLayoutString
(""
+"\n # parameter_annotations :="
@@ -269,7 +269,7 @@
* a type-annotation union and a type-path structure precedes the
* annotation structure
*/
- String typeLayouts[] = {
+ String[] typeLayouts = {
Attribute.normalizeLayoutString
(""
+"\n # type-annotations :="
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/BandStructure.java 2018-09-28 11:25:56.513908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/BandStructure.java 2018-09-28 11:25:56.125908797 +0700
@@ -913,7 +913,7 @@
return ch;
}
@Override
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
int nr = in.read(b, off, len);
if (nr >= 0) bytesForDump.write(b, off, nr);
return nr;
@@ -1378,7 +1378,7 @@
if (out != null) out.write(b);
}
@Override
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
count += len;
if (out != null) out.write(b, off, len);
}
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/ClassReader.java 2018-09-28 11:25:58.037908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/ClassReader.java 2018-09-28 11:25:57.641908797 +0700
@@ -65,7 +65,7 @@
this.cls = cls;
this.verbose = pkg.verbose;
this.in = new DataInputStream(new FilterInputStream(in) {
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
int nr = super.read(b, off, len);
if (nr >= 0) inPos += nr;
return nr;
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/Code.java 2018-09-28 11:25:59.601908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/Code.java 2018-09-28 11:25:59.205908797 +0700
@@ -62,10 +62,10 @@
int max_stack;
int max_locals;
- ConstantPool.Entry handler_class[] = noRefs;
- int handler_start[] = noInts;
- int handler_end[] = noInts;
- int handler_catch[] = noInts;
+ ConstantPool.Entry[] handler_class = noRefs;
+ int[] handler_start = noInts;
+ int[] handler_end = noInts;
+ int[] handler_catch = noInts;
byte[] bytes;
Fixups fixups; // reference relocations, if any are required
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/Coding.java 2018-09-28 11:26:01.025908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/Coding.java 2018-09-28 11:26:00.617908797 +0700
@@ -838,7 +838,7 @@
(byte)(H-1)
};
}
- public static int parseMetaCoding(byte[] bytes, int pos, Coding dflt, CodingMethod res[]) {
+ public static int parseMetaCoding(byte[] bytes, int pos, Coding dflt, CodingMethod[] res) {
int op = bytes[pos++] & 0xFF;
if (_meta_canon_min <= op && op <= _meta_canon_max) {
Coding c = BandStructure.codingForIndex(op);
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/CodingChooser.java 2018-09-28 11:26:02.489908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/CodingChooser.java 2018-09-28 11:26:02.101908797 +0700
@@ -1158,7 +1158,7 @@
count++;
if (out != null) out.write(b);
}
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
count += len;
if (out != null) out.write(b, off, len);
}
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/ConstantPool.java 2018-09-28 11:26:04.009908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/ConstantPool.java 2018-09-28 11:26:03.597908797 +0700
@@ -1581,7 +1581,7 @@
}
// archive constant pool definition order
- static final byte TAGS_IN_ORDER[] = {
+ static final byte[] TAGS_IN_ORDER = {
CONSTANT_Utf8,
CONSTANT_Integer, // cp_Int
CONSTANT_Float,
@@ -1601,7 +1601,7 @@
CONSTANT_BootstrapMethod, // pseudo-tag, really stored in a class attribute
CONSTANT_InvokeDynamic
};
- static final byte TAG_ORDER[];
+ static final byte[] TAG_ORDER;
static {
TAG_ORDER = new byte[CONSTANT_Limit];
for (int i = 0; i < TAGS_IN_ORDER.length; i++) {
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java 2018-09-28 11:26:05.485908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java 2018-09-28 11:26:05.093908797 +0700
@@ -111,7 +111,7 @@
assert(served <= limit || limit == -1);
return ch;
}
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
served += (pos - servedPos);
int nr = super.read(b, off, len);
servedPos = pos;
@@ -132,7 +132,7 @@
++buffered;
return super.read();
}
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
if (buffered == limit)
return -1;
if (limit != -1) {
--- old/src/java.base/share/classes/com/sun/java/util/jar/pack/PopulationCoding.java 2018-09-28 11:26:07.001908797 +0700
+++ new/src/java.base/share/classes/com/sun/java/util/jar/pack/PopulationCoding.java 2018-09-28 11:26:06.601908797 +0700
@@ -444,7 +444,7 @@
}
return bytes.toByteArray();
}
- public static int parseMetaCoding(byte[] bytes, int pos, Coding dflt, CodingMethod res[]) {
+ public static int parseMetaCoding(byte[] bytes, int pos, Coding dflt, CodingMethod[] res) {
int op = bytes[pos++] & 0xFF;
if (op < _meta_pop || op >= _meta_limit) return pos-1; // backup
op -= _meta_pop;
--- old/src/java.base/share/classes/java/io/BufferedInputStream.java 2018-09-28 11:26:08.501908797 +0700
+++ new/src/java.base/share/classes/java/io/BufferedInputStream.java 2018-09-28 11:26:08.121908797 +0700
@@ -336,7 +336,7 @@
* invoking its {@link #close()} method,
* or an I/O error occurs.
*/
- public synchronized int read(byte b[], int off, int len)
+ public synchronized int read(byte[] b, int off, int len)
throws IOException
{
getBufIfOpen(); // Check for closed stream
--- old/src/java.base/share/classes/java/io/BufferedOutputStream.java 2018-09-28 11:26:09.965908797 +0700
+++ new/src/java.base/share/classes/java/io/BufferedOutputStream.java 2018-09-28 11:26:09.573908797 +0700
@@ -38,7 +38,7 @@
/**
* The internal buffer where data is stored.
*/
- protected byte buf[];
+ protected byte[] buf;
/**
* The number of valid bytes in the buffer. This value is always
@@ -114,7 +114,7 @@
* @exception IOException if an I/O error occurs.
*/
@Override
- public synchronized void write(byte b[], int off, int len) throws IOException {
+ public synchronized void write(byte[] b, int off, int len) throws IOException {
if (len >= buf.length) {
/* If the request length exceeds the size of the output buffer,
flush the output buffer and then write the data directly.
--- old/src/java.base/share/classes/java/io/BufferedReader.java 2018-09-28 11:26:11.461908797 +0700
+++ new/src/java.base/share/classes/java/io/BufferedReader.java 2018-09-28 11:26:11.065908797 +0700
@@ -71,7 +71,7 @@
private Reader in;
- private char cb[];
+ private char[] cb;
private int nChars, nextChar;
private static final int INVALIDATED = -2;
@@ -146,7 +146,7 @@
dst = delta;
} else {
/* Reallocate buffer to accommodate read-ahead limit */
- char ncb[] = new char[readAheadLimit];
+ char[] ncb = new char[readAheadLimit];
System.arraycopy(cb, markedChar, ncb, 0, delta);
cb = ncb;
markedChar = 0;
@@ -274,7 +274,7 @@
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
*/
- public int read(char cbuf[], int off, int len) throws IOException {
+ public int read(char[] cbuf, int off, int len) throws IOException {
synchronized (lock) {
ensureOpen();
if ((off < 0) || (off > cbuf.length) || (len < 0) ||
--- old/src/java.base/share/classes/java/io/BufferedWriter.java 2018-09-28 11:26:12.965908797 +0700
+++ new/src/java.base/share/classes/java/io/BufferedWriter.java 2018-09-28 11:26:12.569908797 +0700
@@ -67,7 +67,7 @@
private Writer out;
- private char cb[];
+ private char[] cb;
private int nChars, nextChar;
private static int defaultCharBufferSize = 8192;
@@ -166,7 +166,7 @@
*
* @throws IOException If an I/O error occurs
*/
- public void write(char cbuf[], int off, int len) throws IOException {
+ public void write(char[] cbuf, int off, int len) throws IOException {
synchronized (lock) {
ensureOpen();
if ((off < 0) || (off > cbuf.length) || (len < 0) ||
--- old/src/java.base/share/classes/java/io/ByteArrayInputStream.java 2018-09-28 11:26:14.425908797 +0700
+++ new/src/java.base/share/classes/java/io/ByteArrayInputStream.java 2018-09-28 11:26:13.989908797 +0700
@@ -53,7 +53,7 @@
* stream; element {@code buf[pos]} is
* the next byte to be read.
*/
- protected byte buf[];
+ protected byte[] buf;
/**
* The index of the next character to read from the input stream buffer.
@@ -102,7 +102,7 @@
*
* @param buf the input buffer.
*/
- public ByteArrayInputStream(byte buf[]) {
+ public ByteArrayInputStream(byte[] buf) {
this.buf = buf;
this.pos = 0;
this.count = buf.length;
@@ -122,7 +122,7 @@
* @param offset the offset in the buffer of the first byte to read.
* @param length the maximum number of bytes to read from the buffer.
*/
- public ByteArrayInputStream(byte buf[], int offset, int length) {
+ public ByteArrayInputStream(byte[] buf, int offset, int length) {
this.buf = buf;
this.pos = offset;
this.count = Math.min(offset + length, buf.length);
@@ -169,7 +169,7 @@
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
*/
- public synchronized int read(byte b[], int off, int len) {
+ public synchronized int read(byte[] b, int off, int len) {
Objects.checkFromIndexSize(off, len, b.length);
if (pos >= count) {
--- old/src/java.base/share/classes/java/io/ByteArrayOutputStream.java 2018-09-28 11:26:16.173908797 +0700
+++ new/src/java.base/share/classes/java/io/ByteArrayOutputStream.java 2018-09-28 11:26:15.709908797 +0700
@@ -49,7 +49,7 @@
/**
* The buffer where data is stored.
*/
- protected byte buf[];
+ protected byte[] buf;
/**
* The number of valid bytes in the buffer.
@@ -151,7 +151,7 @@
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
*/
- public synchronized void write(byte b[], int off, int len) {
+ public synchronized void write(byte[] b, int off, int len) {
Objects.checkFromIndexSize(off, len, b.length);
ensureCapacity(count + len);
System.arraycopy(b, off, buf, count, len);
@@ -170,7 +170,7 @@
* @throws NullPointerException if {@code b} is {@code null}.
* @since 11
*/
- public void writeBytes(byte b[]) {
+ public void writeBytes(byte[] b) {
write(b, 0, b.length);
}
--- old/src/java.base/share/classes/java/io/CharArrayReader.java 2018-09-28 11:26:17.741908797 +0700
+++ new/src/java.base/share/classes/java/io/CharArrayReader.java 2018-09-28 11:26:17.317908797 +0700
@@ -34,7 +34,7 @@
*/
public class CharArrayReader extends Reader {
/** The character buffer. */
- protected char buf[];
+ protected char[] buf;
/** The current buffer position. */
protected int pos;
@@ -52,7 +52,7 @@
* Creates a CharArrayReader from the specified array of chars.
* @param buf Input buffer (not copied)
*/
- public CharArrayReader(char buf[]) {
+ public CharArrayReader(char[] buf) {
this.buf = buf;
this.pos = 0;
this.count = buf.length;
@@ -75,7 +75,7 @@
* @param offset Offset of the first char to read
* @param length Number of chars to read
*/
- public CharArrayReader(char buf[], int offset, int length) {
+ public CharArrayReader(char[] buf, int offset, int length) {
if ((offset < 0) || (offset > buf.length) || (length < 0) ||
((offset + length) < 0)) {
throw new IllegalArgumentException();
@@ -118,7 +118,7 @@
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
*/
- public int read(char b[], int off, int len) throws IOException {
+ public int read(char[] b, int off, int len) throws IOException {
synchronized (lock) {
ensureOpen();
if ((off < 0) || (off > b.length) || (len < 0) ||
--- old/src/java.base/share/classes/java/io/CharArrayWriter.java 2018-09-28 11:26:19.137908797 +0700
+++ new/src/java.base/share/classes/java/io/CharArrayWriter.java 2018-09-28 11:26:18.741908797 +0700
@@ -44,7 +44,7 @@
/**
* The buffer where data is stored.
*/
- protected char buf[];
+ protected char[] buf;
/**
* The number of chars in the buffer.
@@ -97,7 +97,7 @@
* or {@code off + len} is negative or greater than the length
* of the given array
*/
- public void write(char c[], int off, int len) {
+ public void write(char[] c, int off, int len) {
if ((off < 0) || (off > c.length) || (len < 0) ||
((off + len) > c.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
--- old/src/java.base/share/classes/java/io/Console.java 2018-09-28 11:26:20.649908797 +0700
+++ new/src/java.base/share/classes/java/io/Console.java 2018-09-28 11:26:20.257908797 +0700
@@ -456,7 +456,7 @@
return in.ready();
}
- public int read(char cbuf[], int offset, int length)
+ public int read(char[] cbuf, int offset, int length)
throws IOException
{
int off = offset;
--- old/src/java.base/share/classes/java/io/DataInput.java 2018-09-28 11:26:22.109908797 +0700
+++ new/src/java.base/share/classes/java/io/DataInput.java 2018-09-28 11:26:21.717908797 +0700
@@ -197,7 +197,7 @@
* all the bytes.
* @throws IOException if an I/O error occurs.
*/
- void readFully(byte b[]) throws IOException;
+ void readFully(byte[] b) throws IOException;
/**
*
@@ -247,7 +247,7 @@
* all the bytes.
* @throws IOException if an I/O error occurs.
*/
- void readFully(byte b[], int off, int len) throws IOException;
+ void readFully(byte[] b, int off, int len) throws IOException;
/**
* Makes an attempt to skip over
--- old/src/java.base/share/classes/java/io/DataInputStream.java 2018-09-28 11:26:23.589908797 +0700
+++ new/src/java.base/share/classes/java/io/DataInputStream.java 2018-09-28 11:26:23.169908797 +0700
@@ -55,8 +55,8 @@
/**
* working arrays initialized on demand by readUTF
*/
- private byte bytearr[] = new byte[80];
- private char chararr[] = new char[80];
+ private byte[] bytearr = new byte[80];
+ private char[] chararr = new char[80];
/**
* Reads some number of bytes from the contained input stream and
@@ -96,7 +96,7 @@
* @see java.io.FilterInputStream#in
* @see java.io.InputStream#read(byte[], int, int)
*/
- public final int read(byte b[]) throws IOException {
+ public final int read(byte[] b) throws IOException {
return in.read(b, 0, b.length);
}
@@ -145,7 +145,7 @@
* @see java.io.FilterInputStream#in
* @see java.io.InputStream#read(byte[], int, int)
*/
- public final int read(byte b[], int off, int len) throws IOException {
+ public final int read(byte[] b, int off, int len) throws IOException {
return in.read(b, off, len);
}
@@ -166,7 +166,7 @@
* another I/O error occurs.
* @see java.io.FilterInputStream#in
*/
- public final void readFully(byte b[]) throws IOException {
+ public final void readFully(byte[] b) throws IOException {
readFully(b, 0, b.length);
}
@@ -192,7 +192,7 @@
* another I/O error occurs.
* @see java.io.FilterInputStream#in
*/
- public final void readFully(byte b[], int off, int len) throws IOException {
+ public final void readFully(byte[] b, int off, int len) throws IOException {
if (len < 0)
throw new IndexOutOfBoundsException();
int n = 0;
@@ -398,7 +398,7 @@
return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
}
- private byte readBuffer[] = new byte[8];
+ private byte[] readBuffer = new byte[8];
/**
* See the general contract of the readLong
@@ -473,7 +473,7 @@
return Double.longBitsToDouble(readLong());
}
- private char lineBuffer[];
+ private char[] lineBuffer;
/**
* See the general contract of the readLine
@@ -504,7 +504,7 @@
*/
@Deprecated
public final String readLine() throws IOException {
- char buf[] = lineBuffer;
+ char[] buf = lineBuffer;
if (buf == null) {
buf = lineBuffer = new char[128];
--- old/src/java.base/share/classes/java/io/DataOutput.java 2018-09-28 11:26:24.989908797 +0700
+++ new/src/java.base/share/classes/java/io/DataOutput.java 2018-09-28 11:26:24.597908797 +0700
@@ -72,7 +72,7 @@
* @param b the data.
* @throws IOException if an I/O error occurs.
*/
- void write(byte b[]) throws IOException;
+ void write(byte[] b) throws IOException;
/**
* Writes len
bytes from array
@@ -94,7 +94,7 @@
* @param len the number of bytes to write.
* @throws IOException if an I/O error occurs.
*/
- void write(byte b[], int off, int len) throws IOException;
+ void write(byte[] b, int off, int len) throws IOException;
/**
* Writes a boolean
value to this output stream.
--- old/src/java.base/share/classes/java/io/DataOutputStream.java 2018-09-28 11:26:26.513908797 +0700
+++ new/src/java.base/share/classes/java/io/DataOutputStream.java 2018-09-28 11:26:26.125908797 +0700
@@ -101,7 +101,7 @@
* @exception IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
- public synchronized void write(byte b[], int off, int len)
+ public synchronized void write(byte[] b, int off, int len)
throws IOException
{
out.write(b, off, len);
@@ -201,7 +201,7 @@
incCount(4);
}
- private byte writeBuffer[] = new byte[8];
+ private byte[] writeBuffer = new byte[8];
/**
* Writes a long
to the underlying output stream as eight
--- old/src/java.base/share/classes/java/io/File.java 2018-09-28 11:26:27.849908797 +0700
+++ new/src/java.base/share/classes/java/io/File.java 2018-09-28 11:26:27.461908797 +0700
@@ -1164,7 +1164,7 @@
* @see java.nio.file.Files#newDirectoryStream(Path,String)
*/
public String[] list(FilenameFilter filter) {
- String names[] = list();
+ String[] names = list();
if ((names == null) || (filter == null)) {
return names;
}
@@ -1257,7 +1257,7 @@
* @see java.nio.file.Files#newDirectoryStream(Path,String)
*/
public File[] listFiles(FilenameFilter filter) {
- String ss[] = list();
+ String[] ss = list();
if (ss == null) return null;
ArrayList files = new ArrayList<>();
for (String s : ss)
@@ -1295,7 +1295,7 @@
* @see java.nio.file.Files#newDirectoryStream(Path,java.nio.file.DirectoryStream.Filter)
*/
public File[] listFiles(FileFilter filter) {
- String ss[] = list();
+ String[] ss = list();
if (ss == null) return null;
ArrayList files = new ArrayList<>();
for (String s : ss) {
--- old/src/java.base/share/classes/java/io/FileInputStream.java 2018-09-28 11:26:29.377908797 +0700
+++ new/src/java.base/share/classes/java/io/FileInputStream.java 2018-09-28 11:26:29.001908797 +0700
@@ -240,7 +240,7 @@
* @param len the number of bytes that are written
* @exception IOException If an I/O error has occurred.
*/
- private native int readBytes(byte b[], int off, int len) throws IOException;
+ private native int readBytes(byte[] b, int off, int len) throws IOException;
/**
* Reads up to b.length
bytes of data from this input
@@ -253,7 +253,7 @@
* the file has been reached.
* @exception IOException if an I/O error occurs.
*/
- public int read(byte b[]) throws IOException {
+ public int read(byte[] b) throws IOException {
return readBytes(b, 0, b.length);
}
@@ -275,7 +275,7 @@
* b.length - off
* @exception IOException if an I/O error occurs.
*/
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
return readBytes(b, off, len);
}
--- old/src/java.base/share/classes/java/io/FileOutputStream.java 2018-09-28 11:26:30.857908797 +0700
+++ new/src/java.base/share/classes/java/io/FileOutputStream.java 2018-09-28 11:26:30.465908797 +0700
@@ -327,7 +327,7 @@
* end of file
* @exception IOException If an I/O error has occurred.
*/
- private native void writeBytes(byte b[], int off, int len, boolean append)
+ private native void writeBytes(byte[] b, int off, int len, boolean append)
throws IOException;
/**
@@ -337,7 +337,7 @@
* @param b the data.
* @exception IOException if an I/O error occurs.
*/
- public void write(byte b[]) throws IOException {
+ public void write(byte[] b) throws IOException {
writeBytes(b, 0, b.length, fdAccess.getAppend(fd));
}
@@ -350,7 +350,7 @@
* @param len the number of bytes to write.
* @exception IOException if an I/O error occurs.
*/
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
writeBytes(b, off, len, fdAccess.getAppend(fd));
}
--- old/src/java.base/share/classes/java/io/FilterInputStream.java 2018-09-28 11:26:32.425908797 +0700
+++ new/src/java.base/share/classes/java/io/FilterInputStream.java 2018-09-28 11:26:32.025908797 +0700
@@ -103,7 +103,7 @@
* @exception IOException if an I/O error occurs.
* @see java.io.FilterInputStream#read(byte[], int, int)
*/
- public int read(byte b[]) throws IOException {
+ public int read(byte[] b) throws IOException {
return read(b, 0, b.length);
}
@@ -129,7 +129,7 @@
* @exception IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
return in.read(b, off, len);
}
--- old/src/java.base/share/classes/java/io/FilterOutputStream.java 2018-09-28 11:26:33.801908797 +0700
+++ new/src/java.base/share/classes/java/io/FilterOutputStream.java 2018-09-28 11:26:33.393908797 +0700
@@ -104,7 +104,7 @@
* @see java.io.FilterOutputStream#write(byte[], int, int)
*/
@Override
- public void write(byte b[]) throws IOException {
+ public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
@@ -129,7 +129,7 @@
* @see java.io.FilterOutputStream#write(int)
*/
@Override
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
if ((off | len | (b.length - (len + off)) | (off + len)) < 0)
throw new IndexOutOfBoundsException();
--- old/src/java.base/share/classes/java/io/FilterReader.java 2018-09-28 11:26:35.489908797 +0700
+++ new/src/java.base/share/classes/java/io/FilterReader.java 2018-09-28 11:26:35.025908797 +0700
@@ -71,7 +71,7 @@
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
*/
- public int read(char cbuf[], int off, int len) throws IOException {
+ public int read(char[] cbuf, int off, int len) throws IOException {
return in.read(cbuf, off, len);
}
--- old/src/java.base/share/classes/java/io/FilterWriter.java 2018-09-28 11:26:37.137908797 +0700
+++ new/src/java.base/share/classes/java/io/FilterWriter.java 2018-09-28 11:26:36.741908797 +0700
@@ -79,7 +79,7 @@
*
* @throws IOException If an I/O error occurs
*/
- public void write(char cbuf[], int off, int len) throws IOException {
+ public void write(char[] cbuf, int off, int len) throws IOException {
out.write(cbuf, off, len);
}
--- old/src/java.base/share/classes/java/io/InputStream.java 2018-09-28 11:26:38.533908797 +0700
+++ new/src/java.base/share/classes/java/io/InputStream.java 2018-09-28 11:26:38.137908797 +0700
@@ -201,7 +201,7 @@
* @exception NullPointerException if b
is null
.
* @see java.io.InputStream#read(byte[], int, int)
*/
- public int read(byte b[]) throws IOException {
+ public int read(byte[] b) throws IOException {
return read(b, 0, b.length);
}
@@ -262,7 +262,7 @@
* b.length - off
* @see java.io.InputStream#read()
*/
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
Objects.checkFromIndexSize(off, len, b.length);
if (len == 0) {
return 0;
--- old/src/java.base/share/classes/java/io/InputStreamReader.java 2018-09-28 11:26:40.057908797 +0700
+++ new/src/java.base/share/classes/java/io/InputStreamReader.java 2018-09-28 11:26:39.641908797 +0700
@@ -181,7 +181,7 @@
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
*/
- public int read(char cbuf[], int offset, int length) throws IOException {
+ public int read(char[] cbuf, int offset, int length) throws IOException {
return sd.read(cbuf, offset, length);
}
--- old/src/java.base/share/classes/java/io/LineNumberInputStream.java 2018-09-28 11:26:42.609908797 +0700
+++ new/src/java.base/share/classes/java/io/LineNumberInputStream.java 2018-09-28 11:26:42.141908797 +0700
@@ -127,7 +127,7 @@
* @exception IOException if an I/O error occurs.
* @see java.io.LineNumberInputStream#read()
*/
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if ((off < 0) || (off > b.length) || (len < 0) ||
@@ -179,7 +179,7 @@
public long skip(long n) throws IOException {
int chunk = 2048;
long remaining = n;
- byte data[];
+ byte[] data;
int nr;
if (n <= 0) {
--- old/src/java.base/share/classes/java/io/LineNumberReader.java 2018-09-28 11:26:45.305908797 +0700
+++ new/src/java.base/share/classes/java/io/LineNumberReader.java 2018-09-28 11:26:44.373908797 +0700
@@ -163,7 +163,7 @@
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
@SuppressWarnings("fallthrough")
- public int read(char cbuf[], int off, int len) throws IOException {
+ public int read(char[] cbuf, int off, int len) throws IOException {
synchronized (lock) {
int n = super.read(cbuf, off, len);
@@ -212,7 +212,7 @@
private static final int maxSkipBufferSize = 8192;
/** Skip buffer, null until allocated */
- private char skipBuffer[] = null;
+ private char[] skipBuffer = null;
/**
* Skip characters.
--- old/src/java.base/share/classes/java/io/ObjectInput.java 2018-09-28 11:26:47.577908797 +0700
+++ new/src/java.base/share/classes/java/io/ObjectInput.java 2018-09-28 11:26:47.029908797 +0700
@@ -67,7 +67,7 @@
* returned when the end of the stream is reached.
* @exception IOException If an I/O error has occurred.
*/
- public int read(byte b[]) throws IOException;
+ public int read(byte[] b) throws IOException;
/**
* Reads into an array of bytes. This method will
@@ -79,7 +79,7 @@
* returned when the end of the stream is reached.
* @exception IOException If an I/O error has occurred.
*/
- public int read(byte b[], int off, int len) throws IOException;
+ public int read(byte[] b, int off, int len) throws IOException;
/**
* Skips n bytes of input.
--- old/src/java.base/share/classes/java/io/ObjectOutput.java 2018-09-28 11:26:51.325908797 +0700
+++ new/src/java.base/share/classes/java/io/ObjectOutput.java 2018-09-28 11:26:49.685908797 +0700
@@ -62,7 +62,7 @@
* @param b the data to be written
* @exception IOException If an I/O error has occurred.
*/
- public void write(byte b[]) throws IOException;
+ public void write(byte[] b) throws IOException;
/**
* Writes a sub array of bytes.
@@ -71,7 +71,7 @@
* @param len the number of bytes that are written
* @exception IOException If an I/O error has occurred.
*/
- public void write(byte b[], int off, int len) throws IOException;
+ public void write(byte[] b, int off, int len) throws IOException;
/**
* Flushes the stream. This will write any buffered
--- old/src/java.base/share/classes/java/io/OutputStream.java 2018-09-28 11:26:55.817908797 +0700
+++ new/src/java.base/share/classes/java/io/OutputStream.java 2018-09-28 11:26:53.989908797 +0700
@@ -79,7 +79,7 @@
}
@Override
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
Objects.checkFromIndexSize(off, len, b.length);
ensureOpen();
}
@@ -118,7 +118,7 @@
* @exception IOException if an I/O error occurs.
* @see java.io.OutputStream#write(byte[], int, int)
*/
- public void write(byte b[]) throws IOException {
+ public void write(byte[] b) throws IOException {
write(b, 0, b.length);
}
@@ -150,7 +150,7 @@
* an IOException
is thrown if the output
* stream is closed.
*/
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
Objects.checkFromIndexSize(off, len, b.length);
// len == 0 condition implicitly handled by loop bounds
for (int i = 0 ; i < len ; i++) {
--- old/src/java.base/share/classes/java/io/OutputStreamWriter.java 2018-09-28 11:27:02.457908797 +0700
+++ new/src/java.base/share/classes/java/io/OutputStreamWriter.java 2018-09-28 11:27:00.593908797 +0700
@@ -207,7 +207,7 @@
*
* @throws IOException If an I/O error occurs
*/
- public void write(char cbuf[], int off, int len) throws IOException {
+ public void write(char[] cbuf, int off, int len) throws IOException {
se.write(cbuf, off, len);
}
--- old/src/java.base/share/classes/java/io/PipedInputStream.java 2018-09-28 11:27:08.189908797 +0700
+++ new/src/java.base/share/classes/java/io/PipedInputStream.java 2018-09-28 11:27:07.481908797 +0700
@@ -74,7 +74,7 @@
* The circular buffer into which incoming data is placed.
* @since 1.1
*/
- protected byte buffer[];
+ protected byte[] buffer;
/**
* The index of the position in the circular buffer at which the
@@ -222,7 +222,7 @@
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed,or if an I/O error occurs.
*/
- synchronized void receive(byte b[], int off, int len) throws IOException {
+ synchronized void receive(byte[] b, int off, int len) throws IOException {
checkStateForReceive();
writeSide = Thread.currentThread();
int bytesToTransfer = len;
@@ -364,7 +364,7 @@
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed, or if an I/O error occurs.
*/
- public synchronized int read(byte b[], int off, int len) throws IOException {
+ public synchronized int read(byte[] b, int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else if (off < 0 || len < 0 || len > b.length - off) {
--- old/src/java.base/share/classes/java/io/PipedOutputStream.java 2018-09-28 11:27:15.273908797 +0700
+++ new/src/java.base/share/classes/java/io/PipedOutputStream.java 2018-09-28 11:27:13.705908797 +0700
@@ -135,7 +135,7 @@
* {@link #connect(java.io.PipedInputStream) unconnected},
* closed, or if an I/O error occurs.
*/
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
if (sink == null) {
throw new IOException("Pipe not connected");
} else if (b == null) {
--- old/src/java.base/share/classes/java/io/PipedReader.java 2018-09-28 11:27:19.477908797 +0700
+++ new/src/java.base/share/classes/java/io/PipedReader.java 2018-09-28 11:27:18.125908797 +0700
@@ -53,7 +53,7 @@
/**
* The circular buffer into which incoming data is placed.
*/
- char buffer[];
+ char[] buffer;
/**
* The index of the position in the circular buffer at which the
@@ -201,7 +201,7 @@
* Receives data into an array of characters. This method will
* block until some input is available.
*/
- synchronized void receive(char c[], int off, int len) throws IOException {
+ synchronized void receive(char[] c, int off, int len) throws IOException {
while (--len >= 0) {
receive(c[off++]);
}
@@ -288,7 +288,7 @@
* or an I/O error occurs.
* @exception IndexOutOfBoundsException {@inheritDoc}
*/
- public synchronized int read(char cbuf[], int off, int len) throws IOException {
+ public synchronized int read(char[] cbuf, int off, int len) throws IOException {
if (!connected) {
throw new IOException("Pipe not connected");
} else if (closedByReader) {
--- old/src/java.base/share/classes/java/io/PipedWriter.java 2018-09-28 11:27:24.809908797 +0700
+++ new/src/java.base/share/classes/java/io/PipedWriter.java 2018-09-28 11:27:23.753908797 +0700
@@ -147,7 +147,7 @@
* {@link #connect(java.io.PipedReader) unconnected}, closed
* or an I/O error occurs.
*/
- public void write(char cbuf[], int off, int len) throws IOException {
+ public void write(char[] cbuf, int off, int len) throws IOException {
if (sink == null) {
throw new IOException("Pipe not connected");
} else if ((off | len | (off + len) | (cbuf.length - (off + len))) < 0) {
--- old/src/java.base/share/classes/java/io/PrintStream.java 2018-09-28 11:27:29.813908797 +0700
+++ new/src/java.base/share/classes/java/io/PrintStream.java 2018-09-28 11:27:28.713908797 +0700
@@ -552,7 +552,7 @@
* @param off Offset from which to start taking bytes
* @param len Number of bytes to write
*/
- public void write(byte buf[], int off, int len) {
+ public void write(byte[] buf, int off, int len) {
try {
synchronized (this) {
ensureOpen();
@@ -575,7 +575,7 @@
* stream occur as promptly as with the original PrintStream.
*/
- private void write(char buf[]) {
+ private void write(char[] buf) {
try {
synchronized (this) {
ensureOpen();
@@ -728,7 +728,7 @@
*
* @throws NullPointerException If {@code s} is {@code null}
*/
- public void print(char s[]) {
+ public void print(char[] s) {
write(s);
}
@@ -863,7 +863,7 @@
*
* @param x an array of chars to print.
*/
- public void println(char x[]) {
+ public void println(char[] x) {
synchronized (this) {
print(x);
newLine();
--- old/src/java.base/share/classes/java/io/PrintWriter.java 2018-09-28 11:27:38.693908797 +0700
+++ new/src/java.base/share/classes/java/io/PrintWriter.java 2018-09-28 11:27:36.405908797 +0700
@@ -500,7 +500,7 @@
* cause the corresponding method of the underlying {@code Writer}
* to throw an {@code IndexOutOfBoundsException}
*/
- public void write(char buf[], int off, int len) {
+ public void write(char[] buf, int off, int len) {
try {
synchronized (lock) {
ensureOpen();
@@ -520,7 +520,7 @@
* Writer class because it must suppress I/O exceptions.
* @param buf Array of characters to be written
*/
- public void write(char buf[]) {
+ public void write(char[] buf) {
write(buf, 0, buf.length);
}
@@ -669,7 +669,7 @@
*
* @throws NullPointerException If {@code s} is {@code null}
*/
- public void print(char s[]) {
+ public void print(char[] s) {
write(s);
}
@@ -803,7 +803,7 @@
*
* @param x the array of {@code char} values to be printed
*/
- public void println(char x[]) {
+ public void println(char[] x) {
synchronized (lock) {
print(x);
println();
--- old/src/java.base/share/classes/java/io/PushbackReader.java 2018-09-28 11:27:43.465908797 +0700
+++ new/src/java.base/share/classes/java/io/PushbackReader.java 2018-09-28 11:27:42.333908797 +0700
@@ -104,7 +104,7 @@
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
*/
- public int read(char cbuf[], int off, int len) throws IOException {
+ public int read(char[] cbuf, int off, int len) throws IOException {
synchronized (lock) {
ensureOpen();
try {
@@ -172,7 +172,7 @@
* @exception IOException If there is insufficient room in the pushback
* buffer, or if some other I/O error occurs
*/
- public void unread(char cbuf[], int off, int len) throws IOException {
+ public void unread(char[] cbuf, int off, int len) throws IOException {
synchronized (lock) {
ensureOpen();
if (len > pos)
@@ -193,7 +193,7 @@
* @exception IOException If there is insufficient room in the pushback
* buffer, or if some other I/O error occurs
*/
- public void unread(char cbuf[]) throws IOException {
+ public void unread(char[] cbuf) throws IOException {
unread(cbuf, 0, cbuf.length);
}
--- old/src/java.base/share/classes/java/io/RandomAccessFile.java 2018-09-28 11:27:52.409908797 +0700
+++ new/src/java.base/share/classes/java/io/RandomAccessFile.java 2018-09-28 11:27:50.357908797 +0700
@@ -375,7 +375,7 @@
* @param len the number of bytes to read.
* @exception IOException If an I/O error has occurred.
*/
- private native int readBytes(byte b[], int off, int len) throws IOException;
+ private native int readBytes(byte[] b, int off, int len) throws IOException;
/**
* Reads up to {@code len} bytes of data from this file into an
@@ -402,7 +402,7 @@
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
*/
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
return readBytes(b, off, len);
}
@@ -425,7 +425,7 @@
* some other I/O error occurs.
* @exception NullPointerException If {@code b} is {@code null}.
*/
- public int read(byte b[]) throws IOException {
+ public int read(byte[] b) throws IOException {
return readBytes(b, 0, b.length);
}
@@ -442,7 +442,7 @@
* all the bytes.
* @throws IOException if an I/O error occurs.
*/
- public final void readFully(byte b[]) throws IOException {
+ public final void readFully(byte[] b) throws IOException {
readFully(b, 0, b.length);
}
@@ -464,7 +464,7 @@
* all the bytes.
* @throws IOException if an I/O error occurs.
*/
- public final void readFully(byte b[], int off, int len) throws IOException {
+ public final void readFully(byte[] b, int off, int len) throws IOException {
int n = 0;
do {
int count = this.read(b, off + n, len - n);
@@ -533,7 +533,7 @@
* @param len the number of bytes that are written
* @exception IOException If an I/O error has occurred.
*/
- private native void writeBytes(byte b[], int off, int len) throws IOException;
+ private native void writeBytes(byte[] b, int off, int len) throws IOException;
/**
* Writes {@code b.length} bytes from the specified byte array
@@ -542,7 +542,7 @@
* @param b the data.
* @exception IOException if an I/O error occurs.
*/
- public void write(byte b[]) throws IOException {
+ public void write(byte[] b) throws IOException {
writeBytes(b, 0, b.length);
}
@@ -555,7 +555,7 @@
* @param len the number of bytes to write.
* @exception IOException if an I/O error occurs.
*/
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
writeBytes(b, off, len);
}
--- old/src/java.base/share/classes/java/io/Reader.java 2018-09-28 11:28:00.969908797 +0700
+++ new/src/java.base/share/classes/java/io/Reader.java 2018-09-28 11:27:59.545908797 +0700
@@ -206,7 +206,7 @@
* @exception IOException If an I/O error occurs
*/
public int read() throws IOException {
- char cb[] = new char[1];
+ char[] cb = new char[1];
if (read(cb, 0, 1) == -1)
return -1;
else
@@ -225,7 +225,7 @@
*
* @exception IOException If an I/O error occurs
*/
- public int read(char cbuf[]) throws IOException {
+ public int read(char[] cbuf) throws IOException {
return read(cbuf, 0, cbuf.length);
}
@@ -246,13 +246,13 @@
* If {@code off} is negative, or {@code len} is negative,
* or {@code len} is greater than {@code cbuf.length - off}
*/
- public abstract int read(char cbuf[], int off, int len) throws IOException;
+ public abstract int read(char[] cbuf, int off, int len) throws IOException;
/** Maximum skip-buffer size */
private static final int maxSkipBufferSize = 8192;
/** Skip buffer, null until allocated */
- private char skipBuffer[] = null;
+ private char[] skipBuffer = null;
/**
* Skips characters. This method will block until some characters are
--- old/src/java.base/share/classes/java/io/SequenceInputStream.java 2018-09-28 11:28:08.733908797 +0700
+++ new/src/java.base/share/classes/java/io/SequenceInputStream.java 2018-09-28 11:28:07.005908797 +0700
@@ -185,7 +185,7 @@
* b.length - off
* @exception IOException if an I/O error occurs.
*/
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
if (in == null) {
return -1;
} else if (b == null) {
--- old/src/java.base/share/classes/java/io/StreamTokenizer.java 2018-09-28 11:28:14.097908797 +0700
+++ new/src/java.base/share/classes/java/io/StreamTokenizer.java 2018-09-28 11:28:13.041908797 +0700
@@ -68,7 +68,7 @@
private Reader reader = null;
private InputStream input = null;
- private char buf[] = new char[20];
+ private char[] buf = new char[20];
/**
* The next character to be considered by the nextToken method. May also
@@ -91,7 +91,7 @@
private boolean slashSlashCommentsP = false;
private boolean slashStarCommentsP = false;
- private byte ctype[] = new byte[256];
+ private byte[] ctype = new byte[256];
private static final byte CT_WHITESPACE = 1;
private static final byte CT_DIGIT = 2;
private static final byte CT_ALPHA = 4;
@@ -527,7 +527,7 @@
pushedBack = false;
return ttype;
}
- byte ct[] = ctype;
+ byte[] ct = ctype;
sval = null;
int c = peekc;
@@ -821,7 +821,7 @@
break;
}
- char s[] = new char[3];
+ char[] s = new char[3];
s[0] = s[2] = '\'';
s[1] = (char) ttype;
ret = new String(s);
--- old/src/java.base/share/classes/java/io/StringBufferInputStream.java 2018-09-28 11:28:15.833908797 +0700
+++ new/src/java.base/share/classes/java/io/StringBufferInputStream.java 2018-09-28 11:28:15.433908797 +0700
@@ -109,7 +109,7 @@
* the stream has been reached.
*/
@SuppressWarnings("deprecation")
- public synchronized int read(byte b[], int off, int len) {
+ public synchronized int read(byte[] b, int off, int len) {
if (b == null) {
throw new NullPointerException();
} else if ((off < 0) || (off > b.length) || (len < 0) ||
--- old/src/java.base/share/classes/java/io/StringReader.java 2018-09-28 11:28:17.365908797 +0700
+++ new/src/java.base/share/classes/java/io/StringReader.java 2018-09-28 11:28:16.949908797 +0700
@@ -86,7 +86,7 @@
* @exception IOException If an I/O error occurs
* @exception IndexOutOfBoundsException {@inheritDoc}
*/
- public int read(char cbuf[], int off, int len) throws IOException {
+ public int read(char[] cbuf, int off, int len) throws IOException {
synchronized (lock) {
ensureOpen();
if ((off < 0) || (off > cbuf.length) || (len < 0) ||
--- old/src/java.base/share/classes/java/io/StringWriter.java 2018-09-28 11:28:18.817908797 +0700
+++ new/src/java.base/share/classes/java/io/StringWriter.java 2018-09-28 11:28:18.417908797 +0700
@@ -89,7 +89,7 @@
* or {@code off + len} is negative or greater than the length
* of the given array
*/
- public void write(char cbuf[], int off, int len) {
+ public void write(char[] cbuf, int off, int len) {
if ((off < 0) || (off > cbuf.length) || (len < 0) ||
((off + len) > cbuf.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
--- old/src/java.base/share/classes/java/io/Writer.java 2018-09-28 11:28:20.385908797 +0700
+++ new/src/java.base/share/classes/java/io/Writer.java 2018-09-28 11:28:19.965908797 +0700
@@ -209,7 +209,7 @@
* @throws IOException
* If an I/O error occurs
*/
- public void write(char cbuf[]) throws IOException {
+ public void write(char[] cbuf) throws IOException {
write(cbuf, 0, cbuf.length);
}
@@ -234,7 +234,7 @@
* @throws IOException
* If an I/O error occurs
*/
- public abstract void write(char cbuf[], int off, int len) throws IOException;
+ public abstract void write(char[] cbuf, int off, int len) throws IOException;
/**
* Writes a string.
@@ -277,7 +277,7 @@
*/
public void write(String str, int off, int len) throws IOException {
synchronized (lock) {
- char cbuf[];
+ char[] cbuf;
if (len <= WRITE_BUFFER_SIZE) {
if (writeBuffer == null) {
writeBuffer = new char[WRITE_BUFFER_SIZE];
--- old/src/java.base/share/classes/java/lang/AbstractStringBuilder.java 2018-09-28 11:28:21.945908797 +0700
+++ new/src/java.base/share/classes/java/lang/AbstractStringBuilder.java 2018-09-28 11:28:21.541908797 +0700
@@ -98,8 +98,8 @@
return 0;
}
- byte val1[] = value;
- byte val2[] = another.value;
+ byte[] val1 = value;
+ byte[] val2 = another.value;
int count1 = this.count;
int count2 = another.count;
@@ -677,7 +677,7 @@
* if {@code offset < 0} or {@code len < 0}
* or {@code offset+len > str.length}
*/
- public AbstractStringBuilder append(char str[], int offset, int len) {
+ public AbstractStringBuilder append(char[] str, int offset, int len) {
int end = offset + len;
checkRange(offset, end, str.length);
ensureCapacityInternal(count + len);
@@ -1592,7 +1592,7 @@
* @param dstBegin the char index, not offset of byte[]
* @param coder the coder of dst[]
*/
- void getBytes(byte dst[], int dstBegin, byte coder) {
+ void getBytes(byte[] dst, int dstBegin, byte coder) {
if (this.coder == coder) {
System.arraycopy(value, 0, dst, dstBegin << coder, count << coder);
} else { // this.coder == LATIN && coder == UTF16
--- old/src/java.base/share/classes/java/lang/Byte.java 2018-09-28 11:28:23.797908797 +0700
+++ new/src/java.base/share/classes/java/lang/Byte.java 2018-09-28 11:28:23.393908797 +0700
@@ -79,7 +79,7 @@
private static class ByteCache {
private ByteCache(){}
- static final Byte cache[] = new Byte[-(-128) + 127 + 1];
+ static final Byte[] cache = new Byte[-(-128) + 127 + 1];
static {
for(int i = 0; i < cache.length; i++)
--- old/src/java.base/share/classes/java/lang/Character.java 2018-09-28 11:28:25.185908797 +0700
+++ new/src/java.base/share/classes/java/lang/Character.java 2018-09-28 11:28:24.773908797 +0700
@@ -3099,7 +3099,7 @@
"CJK UNIFIED IDEOGRAPHS EXTENSION F",
"CJKUNIFIEDIDEOGRAPHSEXTENSIONF");
- private static final int blockStarts[] = {
+ private static final int[] blockStarts = {
0x0000, // 0000..007F; Basic Latin
0x0080, // 0080..00FF; Latin-1 Supplement
0x0100, // 0100..017F; Latin Extended-A
@@ -7906,7 +7906,7 @@
private static class CharacterCache {
private CharacterCache(){}
- static final Character cache[] = new Character[127 + 1];
+ static final Character[] cache = new Character[127 + 1];
static {
for (int i = 0; i < cache.length; i++)
@@ -8000,7 +8000,7 @@
* @return a string representation of this object.
*/
public String toString() {
- char buf[] = {value};
+ char[] buf = {value};
return String.valueOf(buf);
}
--- old/src/java.base/share/classes/java/lang/CharacterName.java 2018-09-28 11:28:26.849908797 +0700
+++ new/src/java.base/share/classes/java/lang/CharacterName.java 2018-09-28 11:28:26.433908797 +0700
@@ -59,7 +59,7 @@
int bkNum = dis.readInt();
int cpNum = dis.readInt();
int cpEnd = dis.readInt();
- byte ba[] = new byte[cpEnd];
+ byte[] ba = new byte[cpEnd];
lookup = new int[bkNum * 256];
bkIndices = new int[(Character.MAX_CODE_POINT + 1) >> 8];
strPool = new byte[total - cpEnd];
--- old/src/java.base/share/classes/java/lang/ClassLoader.java 2018-09-28 11:28:28.309908797 +0700
+++ new/src/java.base/share/classes/java/lang/ClassLoader.java 2018-09-28 11:28:27.889908797 +0700
@@ -922,7 +922,7 @@
getNamedPackage(c.getPackageName(), c.getModule());
if (pd.getCodeSource() != null) {
- Certificate certs[] = pd.getCodeSource().getCertificates();
+ Certificate[] certs = pd.getCodeSource().getCertificates();
if (certs != null)
setSigners(c, certs);
}
@@ -2550,8 +2550,8 @@
}
// The paths searched for libraries
- private static String usr_paths[];
- private static String sys_paths[];
+ private static String[] usr_paths;
+ private static String[] sys_paths;
private static String[] initializePath(String propName) {
String ldPath = System.getProperty(propName, "");
--- old/src/java.base/share/classes/java/lang/FdLibm.java 2018-09-28 11:28:29.749908797 +0700
+++ new/src/java.base/share/classes/java/lang/FdLibm.java 2018-09-28 11:28:29.353908797 +0700
@@ -475,11 +475,11 @@
// Compute ss = s_h + s_l = (x-1)/(x+1) or (x-1.5)/(x+1.5)
- final double BP[] = {1.0,
+ final double[] BP = {1.0,
1.5};
- final double DP_H[] = {0.0,
+ final double[] DP_H = {0.0,
0x1.2b80_34p-1}; // 5.84962487220764160156e-01
- final double DP_L[] = {0.0,
+ final double[] DP_L = {0.0,
0x1.cfde_b43c_fd006p-27};// 1.35003920212974897128e-08
// Poly coefs for (3/2)*(log(x)-2s-2/3*s**3
--- old/src/java.base/share/classes/java/lang/Long.java 2018-09-28 11:28:31.317908797 +0700
+++ new/src/java.base/share/classes/java/lang/Long.java 2018-09-28 11:28:30.905908797 +0700
@@ -1147,7 +1147,7 @@
private static class LongCache {
private LongCache(){}
- static final Long cache[] = new Long[-(-128) + 127 + 1];
+ static final Long[] cache = new Long[-(-128) + 127 + 1];
static {
for(int i = 0; i < cache.length; i++)
--- old/src/java.base/share/classes/java/lang/Runtime.java 2018-09-28 11:28:32.821908797 +0700
+++ new/src/java.base/share/classes/java/lang/Runtime.java 2018-09-28 11:28:32.413908797 +0700
@@ -446,7 +446,7 @@
*
* @see ProcessBuilder
*/
- public Process exec(String cmdarray[]) throws IOException {
+ public Process exec(String[] cmdarray) throws IOException {
return exec(cmdarray, null, null);
}
--- old/src/java.base/share/classes/java/lang/SecurityManager.java 2018-09-28 11:28:34.333908797 +0700
+++ new/src/java.base/share/classes/java/lang/SecurityManager.java 2018-09-28 11:28:33.953908797 +0700
@@ -1114,7 +1114,7 @@
private static final Object packageDefinitionLock = new Object();
private static String[] getPackages(String p) {
- String packages[] = null;
+ String[] packages = null;
if (p != null && !p.equals("")) {
java.util.StringTokenizer tok =
new java.util.StringTokenizer(p, ",");
--- old/src/java.base/share/classes/java/lang/Short.java 2018-09-28 11:28:35.877908797 +0700
+++ new/src/java.base/share/classes/java/lang/Short.java 2018-09-28 11:28:35.449908797 +0700
@@ -205,7 +205,7 @@
private static class ShortCache {
private ShortCache(){}
- static final Short cache[] = new Short[-(-128) + 127 + 1];
+ static final Short[] cache = new Short[-(-128) + 127 + 1];
static {
for(int i = 0; i < cache.length; i++)
--- old/src/java.base/share/classes/java/lang/String.java 2018-09-28 11:28:37.425908797 +0700
+++ new/src/java.base/share/classes/java/lang/String.java 2018-09-28 11:28:37.001908797 +0700
@@ -250,7 +250,7 @@
* @param value
* The initial value of the string
*/
- public String(char value[]) {
+ public String(char[] value) {
this(value, 0, value.length, null);
}
@@ -275,7 +275,7 @@
* If {@code offset} is negative, {@code count} is negative, or
* {@code offset} is greater than {@code value.length - count}
*/
- public String(char value[], int offset, int count) {
+ public String(char[] value, int offset, int count) {
this(value, offset, count, rangeCheck(value, offset, count));
}
@@ -372,7 +372,7 @@
* @see #String(byte[])
*/
@Deprecated(since="1.1")
- public String(byte ascii[], int hibyte, int offset, int count) {
+ public String(byte[] ascii, int hibyte, int offset, int count) {
checkBoundsOffCount(offset, count, ascii.length);
if (count == 0) {
this.value = "".value;
@@ -424,7 +424,7 @@
* @see #String(byte[])
*/
@Deprecated(since="1.1")
- public String(byte ascii[], int hibyte) {
+ public String(byte[] ascii, int hibyte) {
this(ascii, hibyte, 0, ascii.length);
}
@@ -461,7 +461,7 @@
*
* @since 1.1
*/
- public String(byte bytes[], int offset, int length, String charsetName)
+ public String(byte[] bytes, int offset, int length, String charsetName)
throws UnsupportedEncodingException {
if (charsetName == null)
throw new NullPointerException("charsetName");
@@ -502,7 +502,7 @@
*
* @since 1.6
*/
- public String(byte bytes[], int offset, int length, Charset charset) {
+ public String(byte[] bytes, int offset, int length, Charset charset) {
if (charset == null)
throw new NullPointerException("charset");
checkBoundsOffCount(offset, length, bytes.length);
@@ -535,7 +535,7 @@
*
* @since 1.1
*/
- public String(byte bytes[], String charsetName)
+ public String(byte[] bytes, String charsetName)
throws UnsupportedEncodingException {
this(bytes, 0, bytes.length, charsetName);
}
@@ -560,7 +560,7 @@
*
* @since 1.6
*/
- public String(byte bytes[], Charset charset) {
+ public String(byte[] bytes, Charset charset) {
this(bytes, 0, bytes.length, charset);
}
@@ -590,7 +590,7 @@
*
* @since 1.1
*/
- public String(byte bytes[], int offset, int length) {
+ public String(byte[] bytes, int offset, int length) {
checkBoundsOffCount(offset, length, bytes.length);
StringCoding.Result ret = StringCoding.decode(bytes, offset, length);
this.value = ret.value;
@@ -853,7 +853,7 @@
* {@code dstBegin+(srcEnd-srcBegin)} is larger than
* {@code dst.length}
*/
- public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) {
+ public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) {
checkBoundsBeginEnd(srcBegin, srcEnd, length());
checkBoundsOffCount(dstBegin, srcEnd - srcBegin, dst.length);
if (isLatin1()) {
@@ -907,7 +907,7 @@
*
*/
@Deprecated(since="1.1")
- public void getBytes(int srcBegin, int srcEnd, byte dst[], int dstBegin) {
+ public void getBytes(int srcBegin, int srcEnd, byte[] dst, int dstBegin) {
checkBoundsBeginEnd(srcBegin, srcEnd, length());
Objects.requireNonNull(dst);
checkBoundsOffCount(dstBegin, srcEnd - srcBegin, dst.length);
@@ -1043,8 +1043,8 @@
if (len != sb.length()) {
return false;
}
- byte v1[] = value;
- byte v2[] = sb.getValue();
+ byte[] v1 = value;
+ byte[] v2 = sb.getValue();
if (coder() == sb.getCoder()) {
int n = v1.length;
for (int i = 0; i < n; i++) {
@@ -1195,8 +1195,8 @@
* lexicographically greater than the string argument.
*/
public int compareTo(String anotherString) {
- byte v1[] = value;
- byte v2[] = anotherString.value;
+ byte[] v1 = value;
+ byte[] v2 = anotherString.value;
if (coder() == anotherString.coder()) {
return isLatin1() ? StringLatin1.compareTo(v1, v2)
: StringUTF16.compareTo(v1, v2);
@@ -1224,8 +1224,8 @@
private static final long serialVersionUID = 8575799808933029326L;
public int compare(String s1, String s2) {
- byte v1[] = s1.value;
- byte v2[] = s2.value;
+ byte[] v1 = s1.value;
+ byte[] v2 = s2.value;
if (s1.coder() == s2.coder()) {
return s1.isLatin1() ? StringLatin1.compareToCI(v1, v2)
: StringUTF16.compareToCI(v1, v2);
@@ -1297,8 +1297,8 @@
* {@code false} otherwise.
*/
public boolean regionMatches(int toffset, String other, int ooffset, int len) {
- byte tv[] = value;
- byte ov[] = other.value;
+ byte[] tv = value;
+ byte[] ov = other.value;
// Note: toffset, ooffset, or len might be near -1>>>1.
if ((ooffset < 0) || (toffset < 0) ||
(toffset > (long)length() - len) ||
@@ -1397,8 +1397,8 @@
|| (ooffset > (long)other.length() - len)) {
return false;
}
- byte tv[] = value;
- byte ov[] = other.value;
+ byte[] tv = value;
+ byte[] ov = other.value;
if (coder() == other.coder()) {
return isLatin1()
? StringLatin1.regionMatchesCI(tv, toffset, ov, ooffset, len)
@@ -1431,8 +1431,8 @@
if (toffset < 0 || toffset > length() - prefix.length()) {
return false;
}
- byte ta[] = value;
- byte pa[] = prefix.value;
+ byte[] ta = value;
+ byte[] pa = prefix.value;
int po = 0;
int pc = pa.length;
if (coder() == prefix.coder()) {
@@ -3134,7 +3134,7 @@
* @return a {@code String} that contains the characters of the
* character array.
*/
- public static String valueOf(char data[]) {
+ public static String valueOf(char[] data) {
return new String(data);
}
@@ -3158,7 +3158,7 @@
* {@code offset+count} is larger than
* {@code data.length}.
*/
- public static String valueOf(char data[], int offset, int count) {
+ public static String valueOf(char[] data, int offset, int count) {
return new String(data, offset, count);
}
@@ -3175,7 +3175,7 @@
* {@code offset+count} is larger than
* {@code data.length}.
*/
- public static String copyValueOf(char data[], int offset, int count) {
+ public static String copyValueOf(char[] data, int offset, int count) {
return new String(data, offset, count);
}
@@ -3186,7 +3186,7 @@
* @return a {@code String} that contains the characters of the
* character array.
*/
- public static String copyValueOf(char data[]) {
+ public static String copyValueOf(char[] data) {
return new String(data);
}
@@ -3360,7 +3360,7 @@
* @param dstBegin the char index, not offset of byte[]
* @param coder the coder of dst[]
*/
- void getBytes(byte dst[], int dstBegin, byte coder) {
+ void getBytes(byte[] dst, int dstBegin, byte coder) {
if (coder() == coder) {
System.arraycopy(value, 0, dst, dstBegin << coder, value.length);
} else { // this.coder == LATIN && coder == UTF16
--- old/src/java.base/share/classes/java/lang/StringBuffer.java 2018-09-28 11:28:38.937908797 +0700
+++ new/src/java.base/share/classes/java/lang/StringBuffer.java 2018-09-28 11:28:38.509908797 +0700
@@ -767,7 +767,7 @@
count = fields.get("count", 0);
}
- synchronized void getBytes(byte dst[], int dstBegin, byte coder) {
+ synchronized void getBytes(byte[] dst, int dstBegin, byte coder) {
super.getBytes(dst, dstBegin, coder);
}
}
--- old/src/java.base/share/classes/java/lang/StringLatin1.java 2018-09-28 11:28:40.509908797 +0700
+++ new/src/java.base/share/classes/java/lang/StringLatin1.java 2018-09-28 11:28:40.085908797 +0700
@@ -81,11 +81,11 @@
return ret;
}
- public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) {
+ public static void getChars(byte[] value, int srcBegin, int srcEnd, char[] dst, int dstBegin) {
inflate(value, srcBegin, dst, dstBegin, srcEnd - srcBegin);
}
- public static void getBytes(byte[] value, int srcBegin, int srcEnd, byte dst[], int dstBegin) {
+ public static void getBytes(byte[] value, int srcBegin, int srcEnd, byte[] dst, int dstBegin) {
System.arraycopy(value, srcBegin, dst, dstBegin, srcEnd - srcBegin);
}
@@ -304,7 +304,7 @@
}
if (i < len) {
if (canEncode(newChar)) {
- byte buf[] = new byte[len];
+ byte[] buf = new byte[len];
for (int j = 0; j < i; j++) { // TBD arraycopy?
buf[j] = value[j];
}
--- old/src/java.base/share/classes/java/lang/StringUTF16.java 2018-09-28 11:28:41.965908797 +0700
+++ new/src/java.base/share/classes/java/lang/StringUTF16.java 2018-09-28 11:28:41.541908797 +0700
@@ -246,7 +246,7 @@
}
@HotSpotIntrinsicCandidate
- public static void getChars(byte[] value, int srcBegin, int srcEnd, char dst[], int dstBegin) {
+ public static void getChars(byte[] value, int srcBegin, int srcEnd, char[] dst, int dstBegin) {
// We need a range check here because 'getChar' has no checks
if (srcBegin < srcEnd) {
checkBoundsOffCount(srcBegin, srcEnd - srcBegin, value);
@@ -257,7 +257,7 @@
}
/* @see java.lang.String.getBytes(int, int, byte[], int) */
- public static void getBytes(byte[] value, int srcBegin, int srcEnd, byte dst[], int dstBegin) {
+ public static void getBytes(byte[] value, int srcBegin, int srcEnd, byte[] dst, int dstBegin) {
srcBegin <<= 1;
srcEnd <<= 1;
for (int i = srcBegin + (1 >> LO_BYTE_SHIFT); i < srcEnd; i += 2) {
@@ -574,7 +574,7 @@
}
}
if (i < len) {
- byte buf[] = new byte[value.length];
+ byte[] buf = new byte[value.length];
for (int j = 0; j < i; j++) {
putChar(buf, j, getChar(value, j)); // TBD:arraycopy?
}
--- old/src/java.base/share/classes/java/lang/Thread.java 2018-09-28 11:28:43.545908797 +0700
+++ new/src/java.base/share/classes/java/lang/Thread.java 2018-09-28 11:28:43.133908797 +0700
@@ -1251,7 +1251,7 @@
* if {@link java.lang.ThreadGroup#checkAccess} determines that
* the current thread cannot access its thread group
*/
- public static int enumerate(Thread tarray[]) {
+ public static int enumerate(Thread[] tarray) {
return currentThread().getThreadGroup().enumerate(tarray);
}
--- old/src/java.base/share/classes/java/lang/ThreadGroup.java 2018-09-28 11:28:44.997908797 +0700
+++ new/src/java.base/share/classes/java/lang/ThreadGroup.java 2018-09-28 11:28:44.597908797 +0700
@@ -63,10 +63,10 @@
int nUnstartedThreads = 0;
int nthreads;
- Thread threads[];
+ Thread[] threads;
int ngroups;
- ThreadGroup groups[];
+ ThreadGroup[] groups;
/**
* Creates an empty Thread group that is not in any Thread group.
@@ -377,7 +377,7 @@
*
* @since 1.0
*/
- public int enumerate(Thread list[]) {
+ public int enumerate(Thread[] list) {
checkAccess();
return enumerate(list, 0, true);
}
@@ -415,12 +415,12 @@
*
* @since 1.0
*/
- public int enumerate(Thread list[], boolean recurse) {
+ public int enumerate(Thread[] list, boolean recurse) {
checkAccess();
return enumerate(list, 0, recurse);
}
- private int enumerate(Thread list[], int n, boolean recurse) {
+ private int enumerate(Thread[] list, int n, boolean recurse) {
int ngroupsSnapshot = 0;
ThreadGroup[] groupsSnapshot = null;
synchronized (this) {
@@ -511,7 +511,7 @@
*
* @since 1.0
*/
- public int enumerate(ThreadGroup list[]) {
+ public int enumerate(ThreadGroup[] list) {
checkAccess();
return enumerate(list, 0, true);
}
@@ -549,12 +549,12 @@
*
* @since 1.0
*/
- public int enumerate(ThreadGroup list[], boolean recurse) {
+ public int enumerate(ThreadGroup[] list, boolean recurse) {
checkAccess();
return enumerate(list, 0, recurse);
}
- private int enumerate(ThreadGroup list[], int n, boolean recurse) {
+ private int enumerate(ThreadGroup[] list, int n, boolean recurse) {
int ngroupsSnapshot = 0;
ThreadGroup[] groupsSnapshot = null;
synchronized (this) {
--- old/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java 2018-09-28 11:28:46.589908797 +0700
+++ new/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java 2018-09-28 11:28:46.189908797 +0700
@@ -1682,7 +1682,7 @@
if (elemType == Object.class)
return varargsArray(nargs);
// other cases: primitive arrays, subtypes of Object[]
- MethodHandle cache[] = Makers.TYPED_COLLECTORS.get(elemType);
+ MethodHandle[] cache = Makers.TYPED_COLLECTORS.get(elemType);
MethodHandle mh = nargs < cache.length ? cache[nargs] : null;
if (mh != null) return mh;
if (nargs == 0) {
--- old/src/java.base/share/classes/java/lang/ref/FinalizerHistogram.java 2018-09-28 11:28:48.081908797 +0700
+++ new/src/java.base/share/classes/java/lang/ref/FinalizerHistogram.java 2018-09-28 11:28:47.717908797 +0700
@@ -72,7 +72,7 @@
}
});
- Entry fhe[] = countMap.values().toArray(new Entry[countMap.size()]);
+ Entry[] fhe = countMap.values().toArray(new Entry[countMap.size()]);
Arrays.sort(fhe,
Comparator.comparingInt(Entry::getInstanceCount).reversed());
return fhe;
--- old/src/java.base/share/classes/java/math/BigDecimal.java 2018-09-28 11:28:49.545908797 +0700
+++ new/src/java.base/share/classes/java/math/BigDecimal.java 2018-09-28 11:28:49.125908797 +0700
@@ -290,7 +290,7 @@
};
// Cache of common small BigDecimal values.
- private static final BigDecimal ZERO_THROUGH_TEN[] = {
+ private static final BigDecimal[] ZERO_THROUGH_TEN = {
new BigDecimal(BigInteger.ZERO, 0, 0, 1),
new BigDecimal(BigInteger.ONE, 1, 0, 1),
new BigDecimal(BigInteger.TWO, 2, 0, 1),
@@ -533,7 +533,7 @@
}
}
} else {
- char coeff[] = new char[len];
+ char[] coeff = new char[len];
for (; len > 0; offset++, len--) {
c = in[offset];
// have digit
@@ -1374,7 +1374,7 @@
long padding = (long) lhs.scale - augend.scale;
if (padding != 0) { // scales differ; alignment needed
- BigDecimal arg[] = preAlign(lhs, augend, padding, mc);
+ BigDecimal[] arg = preAlign(lhs, augend, padding, mc);
matchScale(arg);
lhs = arg[0];
augend = arg[1];
@@ -1913,7 +1913,7 @@
* @since 1.5
*/
public BigDecimal remainder(BigDecimal divisor) {
- BigDecimal divrem[] = this.divideAndRemainder(divisor);
+ BigDecimal[] divrem = this.divideAndRemainder(divisor);
return divrem[1];
}
@@ -1943,7 +1943,7 @@
* @since 1.5
*/
public BigDecimal remainder(BigDecimal divisor, MathContext mc) {
- BigDecimal divrem[] = this.divideAndRemainder(divisor, mc);
+ BigDecimal[] divrem = this.divideAndRemainder(divisor, mc);
return divrem[1];
}
@@ -3633,7 +3633,7 @@
* Powers of 10 which can be represented exactly in {@code
* double}.
*/
- private static final double DOUBLE_10_POW[] = {
+ private static final double[] DOUBLE_10_POW = {
1.0e0, 1.0e1, 1.0e2, 1.0e3, 1.0e4, 1.0e5,
1.0e6, 1.0e7, 1.0e8, 1.0e9, 1.0e10, 1.0e11,
1.0e12, 1.0e13, 1.0e14, 1.0e15, 1.0e16, 1.0e17,
@@ -3644,7 +3644,7 @@
* Powers of 10 which can be represented exactly in {@code
* float}.
*/
- private static final float FLOAT_10_POW[] = {
+ private static final float[] FLOAT_10_POW = {
1.0e0f, 1.0e1f, 1.0e2f, 1.0e3f, 1.0e4f, 1.0e5f,
1.0e6f, 1.0e7f, 1.0e8f, 1.0e9f, 1.0e10f
};
@@ -3952,7 +3952,7 @@
1000000000000000000L // 18 / 10^18
};
- private static volatile BigInteger BIG_TEN_POWERS_TABLE[] = {
+ private static volatile BigInteger[] BIG_TEN_POWERS_TABLE = {
BigInteger.ONE,
BigInteger.valueOf(10),
BigInteger.valueOf(100),
@@ -3979,7 +3979,7 @@
private static final int BIG_TEN_POWERS_TABLE_MAX =
16 * BIG_TEN_POWERS_TABLE_INITLEN;
- private static final long THRESHOLDS_TABLE[] = {
+ private static final long[] THRESHOLDS_TABLE = {
Long.MAX_VALUE, // 0
Long.MAX_VALUE/10L, // 1
Long.MAX_VALUE/100L, // 2
@@ -4712,7 +4712,7 @@
* to be closed to the preferred scale.
*/
private static BigDecimal createAndStripZerosToMatchScale(BigInteger intVal, int scale, long preferredScale) {
- BigInteger qr[]; // quotient-remainder pair
+ BigInteger[] qr; // quotient-remainder pair
while (intVal.compareMagnitude(BigInteger.TEN) >= 0
&& scale > preferredScale) {
if (intVal.testBit(0))
--- old/src/java.base/share/classes/java/math/BigInteger.java 2018-09-28 11:28:51.137908797 +0700
+++ new/src/java.base/share/classes/java/math/BigInteger.java 2018-09-28 11:28:50.725908797 +0700
@@ -629,7 +629,7 @@
// bitsPerDigit in the given radix times 1024
// Rounded up to avoid underallocation.
- private static long bitsPerDigit[] = { 0, 0,
+ private static long[] bitsPerDigit = { 0, 0,
1024, 1624, 2048, 2378, 2648, 2875, 3072, 3247, 3402, 3543, 3672,
3790, 3899, 4001, 4096, 4186, 4271, 4350, 4426, 4498, 4567, 4633,
4696, 4756, 4814, 4870, 4923, 4975, 5025, 5074, 5120, 5166, 5210,
@@ -780,7 +780,7 @@
*/
private static BigInteger smallPrime(int bitLength, int certainty, Random rnd) {
int magLen = (bitLength + 31) >>> 5;
- int temp[] = new int[magLen];
+ int[] temp = new int[magLen];
int highBit = 1 << ((bitLength+31) & 0x1f); // High bit of high int
int highMask = (highBit << 1) - 1; // Bits to keep in high int
@@ -1209,7 +1209,7 @@
* Assumes that the input array will not be modified (the returned
* BigInteger will reference the input array if feasible).
*/
- private static BigInteger valueOf(int val[]) {
+ private static BigInteger valueOf(int[] val) {
return (val[0] > 0 ? new BigInteger(val, 1) : new BigInteger(val));
}
@@ -1219,8 +1219,8 @@
* Initialize static constant array when class is loaded.
*/
private static final int MAX_CONSTANT = 16;
- private static BigInteger posConst[] = new BigInteger[MAX_CONSTANT+1];
- private static BigInteger negConst[] = new BigInteger[MAX_CONSTANT+1];
+ private static BigInteger[] posConst = new BigInteger[MAX_CONSTANT+1];
+ private static BigInteger[] negConst = new BigInteger[MAX_CONSTANT+1];
/**
* The cache of powers of each radix. This allows us to not have to
@@ -1375,7 +1375,7 @@
result[--xIndex] = x[xIndex];
// Grow result if necessary
if (carry) {
- int bigger[] = new int[result.length + 1];
+ int[] bigger = new int[result.length + 1];
System.arraycopy(result, 0, bigger, 1, result.length);
bigger[0] = 0x01;
return bigger;
@@ -1398,7 +1398,7 @@
int xIndex = x.length;
int yIndex = y.length;
- int result[] = new int[xIndex];
+ int[] result = new int[xIndex];
long sum = 0;
if (yIndex == 1) {
sum = (x[--xIndex] & LONG_MASK) + (y[0] & LONG_MASK) ;
@@ -1422,7 +1422,7 @@
// Grow result if necessary
if (carry) {
- int bigger[] = new int[result.length + 1];
+ int[] bigger = new int[result.length + 1];
System.arraycopy(result, 0, bigger, 1, result.length);
bigger[0] = 0x01;
return bigger;
@@ -1433,11 +1433,11 @@
private static int[] subtract(long val, int[] little) {
int highWord = (int)(val >>> 32);
if (highWord == 0) {
- int result[] = new int[1];
+ int[] result = new int[1];
result[0] = (int)(val - (little[0] & LONG_MASK));
return result;
} else {
- int result[] = new int[2];
+ int[] result = new int[2];
if (little.length == 1) {
long difference = ((int)val & LONG_MASK) - (little[0] & LONG_MASK);
result[1] = (int)difference;
@@ -1469,7 +1469,7 @@
private static int[] subtract(int[] big, long val) {
int highWord = (int)(val >>> 32);
int bigIndex = big.length;
- int result[] = new int[bigIndex];
+ int[] result = new int[bigIndex];
long difference = 0;
if (highWord == 0) {
@@ -1525,7 +1525,7 @@
*/
private static int[] subtract(int[] big, int[] little) {
int bigIndex = big.length;
- int result[] = new int[bigIndex];
+ int[] result = new int[bigIndex];
int littleIndex = little.length;
long difference = 0;
@@ -1890,7 +1890,7 @@
return this.abs();
}
- int intSlice[] = new int[sliceSize];
+ int[] intSlice = new int[sliceSize];
System.arraycopy(mag, start, intSlice, 0, sliceSize);
return new BigInteger(trustedStripLeadingZeroInts(intSlice), 1);
@@ -1947,7 +1947,7 @@
return abs();
}
- int lowerInts[] = new int[n];
+ int[] lowerInts = new int[n];
System.arraycopy(mag, len-n, lowerInts, 0, n);
return new BigInteger(trustedStripLeadingZeroInts(lowerInts), 1);
@@ -1966,7 +1966,7 @@
}
int upperLen = len - n;
- int upperInts[] = new int[upperLen];
+ int[] upperInts = new int[upperLen];
System.arraycopy(mag, 0, upperInts, 0, upperLen);
return new BigInteger(trustedStripLeadingZeroInts(upperInts), 1);
@@ -2508,12 +2508,12 @@
return a;
} else { // Array must be resized
if (nBits <= (32-bitsInHighWord)) {
- int result[] = new int[nInts+len];
+ int[] result = new int[nInts+len];
System.arraycopy(a, 0, result, 0, len);
primitiveLeftShift(result, result.length, nBits);
return result;
} else {
- int result[] = new int[nInts+len+1];
+ int[] result = new int[nInts+len+1];
System.arraycopy(a, 0, result, 0, len);
primitiveRightShift(result, result.length, 32 - nBits);
return result;
@@ -3240,7 +3240,7 @@
int nInts = n >>> 5;
int nBits = n & 0x1f;
int magLen = mag.length;
- int newMag[] = null;
+ int[] newMag = null;
if (nBits == 0) {
newMag = new int[magLen + nInts];
@@ -3299,7 +3299,7 @@
int nInts = n >>> 5;
int nBits = n & 0x1f;
int magLen = mag.length;
- int newMag[] = null;
+ int[] newMag = null;
// Special case: entire contents shifted off the end
if (nInts >= magLen)
@@ -3864,7 +3864,7 @@
// Compute upper bound on number of digit groups and allocate space
int maxNumDigitGroups = (4*mag.length + 6)/7;
- String digitGroup[] = new String[maxNumDigitGroups];
+ String[] digitGroup = new String[maxNumDigitGroups];
// Translate number to string, a digit group at a time
BigInteger tmp = this.abs();
@@ -3981,7 +3981,7 @@
}
/* zero[i] is a string of i consecutive zeros. */
- private static String zeros[] = new String[64];
+ private static String[] zeros = new String[64];
static {
zeros[63] =
"000000000000000000000000000000000000000000000000000000000000000";
@@ -4263,7 +4263,7 @@
/**
* Returns a copy of the input array stripped of any leading zero bytes.
*/
- private static int[] stripLeadingZeroInts(int val[]) {
+ private static int[] stripLeadingZeroInts(int[] val) {
int vlen = val.length;
int keep;
@@ -4277,7 +4277,7 @@
* Returns the input array stripped of any leading zero bytes.
* Since the source is trusted the copying may be skipped.
*/
- private static int[] trustedStripLeadingZeroInts(int val[]) {
+ private static int[] trustedStripLeadingZeroInts(int[] val) {
int vlen = val.length;
int keep;
@@ -4290,7 +4290,7 @@
/**
* Returns a copy of the input array stripped of any leading zero bytes.
*/
- private static int[] stripLeadingZeroBytes(byte a[], int off, int len) {
+ private static int[] stripLeadingZeroBytes(byte[] a, int off, int len) {
int indexBound = off + len;
int keep;
@@ -4316,7 +4316,7 @@
* Takes an array a representing a negative 2's-complement number and
* returns the minimal (no leading zero bytes) unsigned whose value is -a.
*/
- private static int[] makePositive(byte a[], int off, int len) {
+ private static int[] makePositive(byte[] a, int off, int len) {
int keep, k;
int indexBound = off + len;
@@ -4332,7 +4332,7 @@
int extraByte = (k == indexBound) ? 1 : 0;
int intLength = ((indexBound - keep + extraByte) + 3) >>> 2;
- int result[] = new int[intLength];
+ int[] result = new int[intLength];
/* Copy one's complement of input into output, leaving extra
* byte (if it exists) == 0x00 */
@@ -4364,7 +4364,7 @@
* Takes an array a representing a negative 2's-complement number and
* returns the minimal (no leading zero ints) unsigned whose value is -a.
*/
- private static int[] makePositive(int a[]) {
+ private static int[] makePositive(int[] a) {
int keep, j;
// Find first non-sign (0xffffffff) int of input
@@ -4376,7 +4376,7 @@
for (j=keep; j < a.length && a[j] == 0; j++)
;
int extraInt = (j == a.length ? 1 : 0);
- int result[] = new int[a.length - keep + extraInt];
+ int[] result = new int[a.length - keep + extraInt];
/* Copy one's complement of input into output, leaving extra
* int (if it exists) == 0x00 */
@@ -4401,11 +4401,11 @@
* nonsense values in their 0 and 1 elements, as radixes 0 and 1 are not
* used.
*/
- private static int digitsPerLong[] = {0, 0,
+ private static int[] digitsPerLong = {0, 0,
62, 39, 31, 27, 24, 22, 20, 19, 18, 18, 17, 17, 16, 16, 15, 15, 15, 14,
14, 14, 14, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12};
- private static BigInteger longRadix[] = {null, null,
+ private static BigInteger[] longRadix = {null, null,
valueOf(0x4000000000000000L), valueOf(0x383d9170b85ff80bL),
valueOf(0x4000000000000000L), valueOf(0x6765c793fa10079dL),
valueOf(0x41c21cb8e1000000L), valueOf(0x3642798750226111L),
@@ -4428,11 +4428,11 @@
/*
* These two arrays are the integer analogue of above.
*/
- private static int digitsPerInt[] = {0, 0, 30, 19, 15, 13, 11,
+ private static int[] digitsPerInt = {0, 0, 30, 19, 15, 13, 11,
11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5};
- private static int intRadix[] = {0, 0,
+ private static int[] intRadix = {0, 0,
0x40000000, 0x4546b3db, 0x40000000, 0x48c27395, 0x159fd800,
0x75db9c97, 0x40000000, 0x17179149, 0x3b9aca00, 0xcc6db61,
0x19a10000, 0x309f1021, 0x57f6c100, 0xa2f1b6f, 0x10000000,
--- old/src/java.base/share/classes/java/math/BitSieve.java 2018-09-28 11:28:52.749908797 +0700
+++ new/src/java.base/share/classes/java/math/BitSieve.java 2018-09-28 11:28:52.361908797 +0700
@@ -48,7 +48,7 @@
/**
* Stores the bits in this bitSieve.
*/
- private long bits[];
+ private long[] bits;
/**
* Length is how many bits this sieve holds.
--- old/src/java.base/share/classes/java/math/MutableBigInteger.java 2018-09-28 11:28:54.245908797 +0700
+++ new/src/java.base/share/classes/java/math/MutableBigInteger.java 2018-09-28 11:28:53.821908797 +0700
@@ -772,7 +772,7 @@
if (carry > 0) { // Result must grow in length
resultLen++;
if (result.length < resultLen) {
- int temp[] = new int[resultLen];
+ int[] temp = new int[resultLen];
// Result one word longer from carry-out; copy low-order
// bits into new result.
System.arraycopy(result, 0, temp, 1, result.length);
@@ -838,7 +838,7 @@
if (carry > 0) { // Result must grow in length
resultLen++;
if (result.length < resultLen) {
- int temp[] = new int[resultLen];
+ int[] temp = new int[resultLen];
// Result one word longer from carry-out; copy low-order
// bits into new result.
System.arraycopy(result, 0, temp, 1, result.length);
--- old/src/java.base/share/classes/java/net/DatagramPacket.java 2018-09-28 11:28:55.801908797 +0700
+++ new/src/java.base/share/classes/java/net/DatagramPacket.java 2018-09-28 11:28:55.401908797 +0700
@@ -80,7 +80,7 @@
*
* @since 1.2
*/
- public DatagramPacket(byte buf[], int offset, int length) {
+ public DatagramPacket(byte[] buf, int offset, int length) {
setData(buf, offset, length);
this.address = null;
this.port = -1;
@@ -96,7 +96,7 @@
* @param buf buffer for holding the incoming datagram.
* @param length the number of bytes to read.
*/
- public DatagramPacket(byte buf[], int length) {
+ public DatagramPacket(byte[] buf, int length) {
this (buf, 0, length);
}
@@ -116,7 +116,7 @@
*
* @since 1.2
*/
- public DatagramPacket(byte buf[], int offset, int length,
+ public DatagramPacket(byte[] buf, int offset, int length,
InetAddress address, int port) {
setData(buf, offset, length);
setAddress(address);
@@ -139,7 +139,7 @@
*
* @since 1.4
*/
- public DatagramPacket(byte buf[], int offset, int length, SocketAddress address) {
+ public DatagramPacket(byte[] buf, int offset, int length, SocketAddress address) {
setData(buf, offset, length);
setSocketAddress(address);
}
@@ -156,7 +156,7 @@
* @param port the destination port number.
* @see java.net.InetAddress
*/
- public DatagramPacket(byte buf[], int length,
+ public DatagramPacket(byte[] buf, int length,
InetAddress address, int port) {
this(buf, 0, length, address, port);
}
@@ -174,7 +174,7 @@
* @since 1.4
* @see java.net.InetAddress
*/
- public DatagramPacket(byte buf[], int length, SocketAddress address) {
+ public DatagramPacket(byte[] buf, int length, SocketAddress address) {
this(buf, 0, length, address);
}
--- old/src/java.base/share/classes/java/net/Inet4Address.java 2018-09-28 11:28:57.269908797 +0700
+++ new/src/java.base/share/classes/java/net/Inet4Address.java 2018-09-28 11:28:56.869908797 +0700
@@ -105,7 +105,7 @@
holder().family = IPv4;
}
- Inet4Address(String hostName, byte addr[]) {
+ Inet4Address(String hostName, byte[] addr) {
holder().hostName = hostName;
holder().family = IPv4;
if (addr != null) {
--- old/src/java.base/share/classes/java/net/Inet6Address.java 2018-09-28 11:28:58.813908797 +0700
+++ new/src/java.base/share/classes/java/net/Inet6Address.java 2018-09-28 11:28:58.421908797 +0700
@@ -228,13 +228,13 @@
*/
boolean scope_ifname_set; // false;
- void setAddr(byte addr[]) {
+ void setAddr(byte[] addr) {
if (addr.length == INADDRSZ) { // normal IPv6 address
System.arraycopy(addr, 0, ipaddress, 0, INADDRSZ);
}
}
- void init(byte addr[], int scope_id) {
+ void init(byte[] addr, int scope_id) {
setAddr(addr);
if (scope_id >= 0) {
@@ -243,7 +243,7 @@
}
}
- void init(byte addr[], NetworkInterface nif)
+ void init(byte[] addr, NetworkInterface nif)
throws UnknownHostException
{
setAddr(addr);
@@ -382,27 +382,27 @@
/* checking of value for scope_id should be done by caller
* scope_id must be >= 0, or -1 to indicate not being set
*/
- Inet6Address(String hostName, byte addr[], int scope_id) {
+ Inet6Address(String hostName, byte[] addr, int scope_id) {
holder.init(hostName, IPv6);
holder6 = new Inet6AddressHolder();
holder6.init(addr, scope_id);
}
- Inet6Address(String hostName, byte addr[]) {
+ Inet6Address(String hostName, byte[] addr) {
holder6 = new Inet6AddressHolder();
try {
initif (hostName, addr, null);
} catch (UnknownHostException e) {} /* cant happen if ifname is null */
}
- Inet6Address (String hostName, byte addr[], NetworkInterface nif)
+ Inet6Address (String hostName, byte[] addr, NetworkInterface nif)
throws UnknownHostException
{
holder6 = new Inet6AddressHolder();
initif (hostName, addr, nif);
}
- Inet6Address (String hostName, byte addr[], String ifname)
+ Inet6Address (String hostName, byte[] addr, String ifname)
throws UnknownHostException
{
holder6 = new Inet6AddressHolder();
@@ -479,7 +479,7 @@
throw new UnknownHostException("addr is of illegal length");
}
- private void initstr(String hostName, byte addr[], String ifname)
+ private void initstr(String hostName, byte[] addr, String ifname)
throws UnknownHostException
{
try {
@@ -493,7 +493,7 @@
}
}
- private void initif(String hostName, byte addr[], NetworkInterface nif)
+ private void initif(String hostName, byte[] addr, NetworkInterface nif)
throws UnknownHostException
{
int family = -1;
--- old/src/java.base/share/classes/java/net/InetAddress.java 2018-09-28 11:29:00.341908797 +0700
+++ new/src/java.base/share/classes/java/net/InetAddress.java 2018-09-28 11:28:59.881908797 +0700
@@ -956,7 +956,7 @@
this.hostsFile = hostsFileName;
}
- private String addrToString(byte addr[]) {
+ private String addrToString(byte[] addr) {
String stringifiedAddress = null;
if (addr.length == Inet4Address.INADDRSZ) {
@@ -1034,7 +1034,7 @@
String hostEntry;
String addrStr = null;
InetAddress[] res = null;
- byte addr[] = new byte[4];
+ byte[] addr = new byte[4];
ArrayList inetAddresses = null;
// lookup the file and create a list InetAddress for the specfied host
--- old/src/java.base/share/classes/java/net/NetworkInterface.java 2018-09-28 11:29:01.805908797 +0700
+++ new/src/java.base/share/classes/java/net/NetworkInterface.java 2018-09-28 11:29:01.389908797 +0700
@@ -48,9 +48,9 @@
private String name;
private String displayName;
private int index;
- private InetAddress addrs[];
- private InterfaceAddress bindings[];
- private NetworkInterface childs[];
+ private InetAddress[] addrs;
+ private InterfaceAddress[] bindings;
+ private NetworkInterface[] childs;
private NetworkInterface parent = null;
private boolean virtual = false;
private static final NetworkInterface defaultInterface;
--- old/src/java.base/share/classes/java/net/SocketInputStream.java 2018-09-28 11:29:03.277908797 +0700
+++ new/src/java.base/share/classes/java/net/SocketInputStream.java 2018-09-28 11:29:02.881908797 +0700
@@ -47,7 +47,7 @@
private boolean eof;
private AbstractPlainSocketImpl impl = null;
- private byte temp[];
+ private byte[] temp;
private Socket socket = null;
/**
@@ -91,7 +91,7 @@
* @exception IOException If an I/O error has occurred.
*/
private native int socketRead0(FileDescriptor fd,
- byte b[], int off, int len,
+ byte[] b, int off, int len,
int timeout)
throws IOException;
@@ -109,7 +109,7 @@
* @exception IOException If an I/O error has occurred.
*/
private int socketRead(FileDescriptor fd,
- byte b[], int off, int len,
+ byte[] b, int off, int len,
int timeout)
throws IOException {
return socketRead0(fd, b, off, len, timeout);
@@ -122,7 +122,7 @@
* returned when the end of the stream is reached.
* @exception IOException If an I/O error has occurred.
*/
- public int read(byte b[]) throws IOException {
+ public int read(byte[] b) throws IOException {
return read(b, 0, b.length);
}
@@ -136,11 +136,11 @@
* returned when the end of the stream is reached.
* @exception IOException If an I/O error has occurred.
*/
- public int read(byte b[], int off, int length) throws IOException {
+ public int read(byte[] b, int off, int length) throws IOException {
return read(b, off, length, impl.getTimeout());
}
- int read(byte b[], int off, int length, int timeout) throws IOException {
+ int read(byte[] b, int off, int length, int timeout) throws IOException {
int n;
// EOF already encountered
@@ -216,7 +216,7 @@
}
long n = numbytes;
int buflen = (int) Math.min(1024, n);
- byte data[] = new byte[buflen];
+ byte[] data = new byte[buflen];
while (n > 0) {
int r = read(data, 0, (int) Math.min((long) buflen, n));
if (r < 0) {
--- old/src/java.base/share/classes/java/net/SocketOutputStream.java 2018-09-28 11:29:04.801908797 +0700
+++ new/src/java.base/share/classes/java/net/SocketOutputStream.java 2018-09-28 11:29:04.405908797 +0700
@@ -44,7 +44,7 @@
}
private AbstractPlainSocketImpl impl = null;
- private byte temp[] = new byte[1];
+ private byte[] temp = new byte[1];
private Socket socket = null;
/**
@@ -94,7 +94,7 @@
* @param len the number of bytes that are written
* @exception IOException If an I/O error has occurred.
*/
- private void socketWrite(byte b[], int off, int len) throws IOException {
+ private void socketWrite(byte[] b, int off, int len) throws IOException {
if (len <= 0 || off < 0 || len > b.length - off) {
@@ -134,7 +134,7 @@
* @param b the data to be written
* @exception SocketException If an I/O error has occurred.
*/
- public void write(byte b[]) throws IOException {
+ public void write(byte[] b) throws IOException {
socketWrite(b, 0, b.length);
}
@@ -146,7 +146,7 @@
* @param len the number of bytes that are written
* @exception SocketException If an I/O error has occurred.
*/
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
socketWrite(b, off, len);
}
--- old/src/java.base/share/classes/java/net/SocketPermission.java 2018-09-28 11:29:06.341908797 +0700
+++ new/src/java.base/share/classes/java/net/SocketPermission.java 2018-09-28 11:29:05.945908797 +0700
@@ -464,7 +464,7 @@
// see if we are being initialized with an IP address.
char ch = host.charAt(0);
if (ch == ':' || Character.digit(ch, 16) != -1) {
- byte ip[] = IPAddressUtil.textToNumericFormatV4(host);
+ byte[] ip = IPAddressUtil.textToNumericFormatV4(host);
if (ip == null) {
ip = IPAddressUtil.textToNumericFormatV6(host);
}
--- old/src/java.base/share/classes/java/net/URLConnection.java 2018-09-28 11:29:07.893908797 +0700
+++ new/src/java.base/share/classes/java/net/URLConnection.java 2018-09-28 11:29:07.465908797 +0700
@@ -1415,7 +1415,7 @@
// make sure we canonicalize the class name: all lower case
contentType = contentType.toLowerCase();
int len = contentType.length();
- char nm[] = new char[len];
+ char[] nm = new char[len];
contentType.getChars(0, len, nm, 0);
for (int i = 0; i < len; i++) {
char c = nm[i];
@@ -1693,7 +1693,7 @@
return false;
}
- int c[] = new int[16];
+ int[] c = new int[16];
if (readBytes(c, 2, is) < 0) {
is.reset();
return false;
@@ -1812,10 +1812,10 @@
* Returns -1, If EOF is reached before len bytes are read, returns 0
* otherwise
*/
- private static int readBytes(int c[], int len, InputStream is)
+ private static int readBytes(int[] c, int len, InputStream is)
throws IOException {
- byte buf[] = new byte[len];
+ byte[] buf = new byte[len];
if (is.read(buf, 0, len) < len) {
return -1;
}
--- old/src/java.base/share/classes/java/text/CharacterIteratorFieldDelegate.java 2018-09-28 11:29:09.533908797 +0700
+++ new/src/java.base/share/classes/java/text/CharacterIteratorFieldDelegate.java 2018-09-28 11:29:09.129908797 +0700
@@ -112,7 +112,7 @@
size = string.length();
}
int iCount = attributedStrings.size();
- AttributedCharacterIterator iterators[] = new
+ AttributedCharacterIterator[] iterators = new
AttributedCharacterIterator[iCount];
for (int counter = 0; counter < iCount; counter++) {
--- old/src/java.base/share/classes/java/text/ChoiceFormat.java 2018-09-28 11:29:10.949908797 +0700
+++ new/src/java.base/share/classes/java/text/ChoiceFormat.java 2018-09-28 11:29:10.545908797 +0700
@@ -349,7 +349,7 @@
* @exception NullPointerException if {@code limits} or
* {@code formats} is {@code null}
*/
- public void setChoices(double[] limits, String formats[]) {
+ public void setChoices(double[] limits, String[] formats) {
if (limits.length != formats.length) {
throw new IllegalArgumentException(
"Array and limit arrays must be of the same length.");
--- old/src/java.base/share/classes/java/text/DateFormatSymbols.java 2018-09-28 11:29:12.425908797 +0700
+++ new/src/java.base/share/classes/java/text/DateFormatSymbols.java 2018-09-28 11:29:12.017908797 +0700
@@ -162,7 +162,7 @@
* indexed by Calendar.BC
and Calendar.AD
.
* @serial
*/
- String eras[] = null;
+ String[] eras = null;
/**
* Month strings. For example: "January", "February", etc. An array
@@ -170,7 +170,7 @@
* Calendar.JANUARY
, Calendar.FEBRUARY
, etc.
* @serial
*/
- String months[] = null;
+ String[] months = null;
/**
* Short month strings. For example: "Jan", "Feb", etc. An array of
@@ -179,7 +179,7 @@
* @serial
*/
- String shortMonths[] = null;
+ String[] shortMonths = null;
/**
* Weekday strings. For example: "Sunday", "Monday", etc. An array
@@ -188,7 +188,7 @@
* The element weekdays[0]
is ignored.
* @serial
*/
- String weekdays[] = null;
+ String[] weekdays = null;
/**
* Short weekday strings. For example: "Sun", "Mon", etc. An array
@@ -197,7 +197,7 @@
* The element shortWeekdays[0]
is ignored.
* @serial
*/
- String shortWeekdays[] = null;
+ String[] shortWeekdays = null;
/**
* AM and PM strings. For example: "AM" and "PM". An array of
@@ -205,7 +205,7 @@
* Calendar.PM
.
* @serial
*/
- String ampms[] = null;
+ String[] ampms = null;
/**
* Localized names of time zones in this locale. This is a
@@ -232,7 +232,7 @@
* @see java.util.TimeZone
* @serial
*/
- String zoneStrings[][] = null;
+ String[][] zoneStrings = null;
/**
* Indicates that zoneStrings is set externally with setZoneStrings() method.
--- old/src/java.base/share/classes/java/text/DecimalFormat.java 2018-09-28 11:29:13.985908797 +0700
+++ new/src/java.base/share/classes/java/text/DecimalFormat.java 2018-09-28 11:29:13.577908797 +0700
@@ -2211,7 +2211,7 @@
private final boolean subparse(String text, ParsePosition parsePosition,
String positivePrefix, String negativePrefix,
DigitList digits, boolean isExponent,
- boolean status[]) {
+ boolean[] status) {
int position = parsePosition.index;
int oldStart = parsePosition.index;
int backup;
--- old/src/java.base/share/classes/java/time/chrono/HijrahChronology.java 2018-09-28 11:29:15.529908797 +0700
+++ new/src/java.base/share/classes/java/time/chrono/HijrahChronology.java 2018-09-28 11:29:15.109908797 +0700
@@ -589,7 +589,7 @@
int day1 = epochMonthToEpochDay(epochMonth);
int date = epochDay - day1; // epochDay - dayOfEpoch(year, month);
- int dateInfo[] = new int[3];
+ int[] dateInfo = new int[3];
dateInfo[0] = year;
dateInfo[1] = month + 1; // change to 1-based.
dateInfo[2] = date + 1; // change to 1-based.
--- old/src/java.base/share/classes/java/util/Arrays.java 2018-09-28 11:29:17.109908797 +0700
+++ new/src/java.base/share/classes/java/util/Arrays.java 2018-09-28 11:29:16.685908797 +0700
@@ -2715,7 +2715,7 @@
* @param a2 the other array to be tested for equality
* @return {@code true} if the two arrays are equal
*/
- public static boolean equals(short[] a, short a2[]) {
+ public static boolean equals(short[] a, short[] a2) {
if (a==a2)
return true;
if (a==null || a2==null)
@@ -4472,7 +4472,7 @@
* @return a content-based hash code for {@code a}
* @since 1.5
*/
- public static int hashCode(long a[]) {
+ public static int hashCode(long[] a) {
if (a == null)
return 0;
@@ -4501,7 +4501,7 @@
* @return a content-based hash code for {@code a}
* @since 1.5
*/
- public static int hashCode(int a[]) {
+ public static int hashCode(int[] a) {
if (a == null)
return 0;
@@ -4528,7 +4528,7 @@
* @return a content-based hash code for {@code a}
* @since 1.5
*/
- public static int hashCode(short a[]) {
+ public static int hashCode(short[] a) {
if (a == null)
return 0;
@@ -4555,7 +4555,7 @@
* @return a content-based hash code for {@code a}
* @since 1.5
*/
- public static int hashCode(char a[]) {
+ public static int hashCode(char[] a) {
if (a == null)
return 0;
@@ -4582,7 +4582,7 @@
* @return a content-based hash code for {@code a}
* @since 1.5
*/
- public static int hashCode(byte a[]) {
+ public static int hashCode(byte[] a) {
if (a == null)
return 0;
@@ -4609,7 +4609,7 @@
* @return a content-based hash code for {@code a}
* @since 1.5
*/
- public static int hashCode(boolean a[]) {
+ public static int hashCode(boolean[] a) {
if (a == null)
return 0;
@@ -4636,7 +4636,7 @@
* @return a content-based hash code for {@code a}
* @since 1.5
*/
- public static int hashCode(float a[]) {
+ public static int hashCode(float[] a) {
if (a == null)
return 0;
@@ -4663,7 +4663,7 @@
* @return a content-based hash code for {@code a}
* @since 1.5
*/
- public static int hashCode(double a[]) {
+ public static int hashCode(double[] a) {
if (a == null)
return 0;
@@ -4696,7 +4696,7 @@
* @see #deepHashCode(Object[])
* @since 1.5
*/
- public static int hashCode(Object a[]) {
+ public static int hashCode(Object[] a) {
if (a == null)
return 0;
@@ -4737,7 +4737,7 @@
* @see #hashCode(Object[])
* @since 1.5
*/
- public static int deepHashCode(Object a[]) {
+ public static int deepHashCode(Object[] a) {
if (a == null)
return 0;
--- old/src/java.base/share/classes/java/util/Calendar.java 2018-09-28 11:29:18.737908797 +0700
+++ new/src/java.base/share/classes/java/util/Calendar.java 2018-09-28 11:29:18.329908797 +0700
@@ -844,7 +844,7 @@
* @serial
*/
@SuppressWarnings("ProtectedField")
- protected int fields[];
+ protected int[] fields;
/**
* The flags which tell if a specified calendar field for the calendar is set.
@@ -855,14 +855,14 @@
* @serial
*/
@SuppressWarnings("ProtectedField")
- protected boolean isSet[];
+ protected boolean[] isSet;
/**
* Pseudo-time-stamps which specify when each field was set. There
* are two special values, UNSET and COMPUTED. Values from
* MINIMUM_USER_SET to Integer.MAX_VALUE are legal user set values.
*/
- private transient int stamp[];
+ private transient int[] stamp;
/**
* The currently set time for this calendar, expressed in milliseconds after
--- old/src/java.base/share/classes/java/util/Collections.java 2018-09-28 11:29:20.277908797 +0700
+++ new/src/java.base/share/classes/java/util/Collections.java 2018-09-28 11:29:19.861908797 +0700
@@ -459,7 +459,7 @@
for (int i=size; i>1; i--)
swap(list, i-1, rnd.nextInt(i));
} else {
- Object arr[] = list.toArray();
+ Object[] arr = list.toArray();
// Shuffle array
for (int i=size; i>1; i--)
--- old/src/java.base/share/classes/java/util/Date.java 2018-09-28 11:29:21.853908797 +0700
+++ new/src/java.base/share/classes/java/util/Date.java 2018-09-28 11:29:21.449908797 +0700
@@ -615,7 +615,7 @@
// syntax error
throw new IllegalArgumentException();
}
- private static final String wtb[] = {
+ private static final String[] wtb = {
"am", "pm",
"monday", "tuesday", "wednesday", "thursday", "friday",
"saturday", "sunday",
@@ -624,7 +624,7 @@
"gmt", "ut", "utc", "est", "edt", "cst", "cdt",
"mst", "mdt", "pst", "pdt"
};
- private static final int ttb[] = {
+ private static final int[] ttb = {
14, 1, 0, 0, 0, 0, 0, 0, 0,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
10000 + 0, 10000 + 0, 10000 + 0, // GMT/UT/UTC
--- old/src/java.base/share/classes/java/util/GregorianCalendar.java 2018-09-28 11:29:23.465908797 +0700
+++ new/src/java.base/share/classes/java/util/GregorianCalendar.java 2018-09-28 11:29:22.989908797 +0700
@@ -398,9 +398,9 @@
private static final int EPOCH_OFFSET = 719163; // Fixed date of January 1, 1970 (Gregorian)
private static final int EPOCH_YEAR = 1970;
- static final int MONTH_LENGTH[]
+ static final int[] MONTH_LENGTH
= {31,28,31,30,31,30,31,31,30,31,30,31}; // 0-based
- static final int LEAP_MONTH_LENGTH[]
+ static final int[] LEAP_MONTH_LENGTH
= {31,29,31,30,31,30,31,31,30,31,30,31}; // 0-based
// Useful millisecond constants. Although ONE_DAY and ONE_WEEK can fit
@@ -437,7 +437,7 @@
*
* *: depends on the Gregorian change date
*/
- static final int MIN_VALUES[] = {
+ static final int[] MIN_VALUES = {
BCE, // ERA
1, // YEAR
JANUARY, // MONTH
@@ -456,7 +456,7 @@
-13*ONE_HOUR, // ZONE_OFFSET (UNIX compatibility)
0 // DST_OFFSET
};
- static final int LEAST_MAX_VALUES[] = {
+ static final int[] LEAST_MAX_VALUES = {
CE, // ERA
292269054, // YEAR
DECEMBER, // MONTH
@@ -475,7 +475,7 @@
14*ONE_HOUR, // ZONE_OFFSET
20*ONE_MINUTE // DST_OFFSET (historical least maximum)
};
- static final int MAX_VALUES[] = {
+ static final int[] MAX_VALUES = {
CE, // ERA
292278994, // YEAR
DECEMBER, // MONTH
--- old/src/java.base/share/classes/java/util/Hashtable.java 2018-09-28 11:29:27.701908797 +0700
+++ new/src/java.base/share/classes/java/util/Hashtable.java 2018-09-28 11:29:26.609908797 +0700
@@ -310,7 +310,7 @@
throw new NullPointerException();
}
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
for (int i = tab.length ; i-- > 0 ;) {
for (Entry,?> e = tab[i] ; e != null ; e = e.next) {
if (e.value.equals(value)) {
@@ -348,7 +348,7 @@
* @see #contains(Object)
*/
public synchronized boolean containsKey(Object key) {
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
for (Entry,?> e = tab[index] ; e != null ; e = e.next) {
@@ -376,7 +376,7 @@
*/
@SuppressWarnings("unchecked")
public synchronized V get(Object key) {
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
for (Entry,?> e = tab[index] ; e != null ; e = e.next) {
@@ -434,7 +434,7 @@
}
private void addEntry(int hash, K key, V value, int index) {
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
if (count >= threshold) {
// Rehash the table if the threshold is exceeded
rehash();
@@ -476,7 +476,7 @@
}
// Makes sure the key is not already in the hashtable.
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -503,7 +503,7 @@
* @throws NullPointerException if the key is {@code null}
*/
public synchronized V remove(Object key) {
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -543,7 +543,7 @@
* Clears this hashtable so that it contains no keys.
*/
public synchronized void clear() {
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
for (int index = tab.length; --index >= 0; )
tab[index] = null;
modCount++;
@@ -930,7 +930,7 @@
Objects.requireNonNull(value);
// Makes sure the key is not already in the hashtable.
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -953,7 +953,7 @@
public synchronized boolean remove(Object key, Object value) {
Objects.requireNonNull(value);
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -978,7 +978,7 @@
public synchronized boolean replace(K key, V oldValue, V newValue) {
Objects.requireNonNull(oldValue);
Objects.requireNonNull(newValue);
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -999,7 +999,7 @@
@Override
public synchronized V replace(K key, V value) {
Objects.requireNonNull(value);
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -1028,7 +1028,7 @@
public synchronized V computeIfAbsent(K key, Function super K, ? extends V> mappingFunction) {
Objects.requireNonNull(mappingFunction);
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -1064,7 +1064,7 @@
public synchronized V computeIfPresent(K key, BiFunction super K, ? super V, ? extends V> remappingFunction) {
Objects.requireNonNull(remappingFunction);
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -1106,7 +1106,7 @@
public synchronized V compute(K key, BiFunction super K, ? super V, ? extends V> remappingFunction) {
Objects.requireNonNull(remappingFunction);
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
@@ -1157,7 +1157,7 @@
public synchronized V merge(K key, V value, BiFunction super V, ? super V, ? extends V> remappingFunction) {
Objects.requireNonNull(remappingFunction);
- Entry,?> tab[] = table;
+ Entry,?>[] tab = table;
int hash = key.hashCode();
int index = (hash & 0x7FFFFFFF) % tab.length;
@SuppressWarnings("unchecked")
--- old/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java 2018-09-28 11:29:32.545908797 +0700
+++ new/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java 2018-09-28 11:29:31.221908797 +0700
@@ -191,7 +191,7 @@
*
* *: depends on eras
*/
- static final int MIN_VALUES[] = {
+ static final int[] MIN_VALUES = {
0, // ERA
-292275055, // YEAR
JANUARY, // MONTH
@@ -210,7 +210,7 @@
-13*ONE_HOUR, // ZONE_OFFSET (UNIX compatibility)
0 // DST_OFFSET
};
- static final int LEAST_MAX_VALUES[] = {
+ static final int[] LEAST_MAX_VALUES = {
0, // ERA (initialized later)
0, // YEAR (initialized later)
JANUARY, // MONTH (Showa 64 ended in January.)
@@ -229,7 +229,7 @@
14*ONE_HOUR, // ZONE_OFFSET
20*ONE_MINUTE // DST_OFFSET (historical least maximum)
};
- static final int MAX_VALUES[] = {
+ static final int[] MAX_VALUES = {
0, // ERA
292278994, // YEAR
DECEMBER, // MONTH
--- old/src/java.base/share/classes/java/util/JumboEnumSet.java 2018-09-28 11:29:36.513908797 +0700
+++ new/src/java.base/share/classes/java/util/JumboEnumSet.java 2018-09-28 11:29:36.081908797 +0700
@@ -41,7 +41,7 @@
* element of this array represents the presence of universe[64*j +i]
* in this set.
*/
- private long elements[];
+ private long[] elements;
// Redundant - maintained for performance
private int size = 0;
--- old/src/java.base/share/classes/java/util/Locale.java 2018-09-28 11:29:38.713908797 +0700
+++ new/src/java.base/share/classes/java/util/Locale.java 2018-09-28 11:29:38.261908797 +0700
@@ -1924,7 +1924,7 @@
.getResourceBundleBased()
.getLocaleResources(inLocale);
- String names[] = getDisplayVariantArray(inLocale);
+ String[] names = getDisplayVariantArray(inLocale);
// Get the localized patterns for formatting a list, and use
// them to format the list.
--- old/src/java.base/share/classes/java/util/SimpleTimeZone.java 2018-09-28 11:29:40.589908797 +0700
+++ new/src/java.base/share/classes/java/util/SimpleTimeZone.java 2018-09-28 11:29:40.177908797 +0700
@@ -1114,9 +1114,9 @@
* 31, 31, 30, 31, 30, 31}. This is ignored as of the Java 2 platform v1.2, however, it must
* be streamed out for compatibility with JDK 1.1.
*/
- private final byte monthLength[] = staticMonthLength;
- private static final byte staticMonthLength[] = {31,28,31,30,31,30,31,31,30,31,30,31};
- private static final byte staticLeapMonthLength[] = {31,29,31,30,31,30,31,31,30,31,30,31};
+ private final byte[] monthLength = staticMonthLength;
+ private static final byte[] staticMonthLength = {31,28,31,30,31,30,31,31,30,31,30,31};
+ private static final byte[] staticLeapMonthLength = {31,29,31,30,31,30,31,31,30,31,30,31};
/**
* Variables specifying the mode of the start rule. Takes the following
--- old/src/java.base/share/classes/java/util/jar/JarInputStream.java 2018-09-28 11:29:42.501908797 +0700
+++ new/src/java.base/share/classes/java/util/jar/JarInputStream.java 2018-09-28 11:29:42.081908797 +0700
@@ -91,7 +91,7 @@
{
if (e != null && JarFile.MANIFEST_NAME.equalsIgnoreCase(e.getName())) {
man = new Manifest();
- byte bytes[] = getBytes(new BufferedInputStream(this));
+ byte[] bytes = getBytes(new BufferedInputStream(this));
man.read(new ByteArrayInputStream(bytes));
closeEntry();
if (doVerify) {
--- old/src/java.base/share/classes/java/util/jar/JarVerifier.java 2018-09-28 11:29:43.865908797 +0700
+++ new/src/java.base/share/classes/java/util/jar/JarVerifier.java 2018-09-28 11:29:43.489908797 +0700
@@ -82,7 +82,7 @@
private volatile ManifestDigester manDig;
/** the bytes for the manDig object */
- byte manifestRawBytes[] = null;
+ byte[] manifestRawBytes = null;
/** controls eager signature validation */
boolean eagerValidation;
@@ -93,7 +93,7 @@
/** collect -DIGEST-MANIFEST values for blacklist */
private List