Skip to content

Commit bd9c779

Browse files
gkdncopybara-github
authored andcommitted
Cleanup change automatically generated by error-prone refactoring MixedArrayDimensions.
PiperOrigin-RevId: 863469859
1 parent b2590c3 commit bd9c779

21 files changed

+1062
-1067
lines changed

jre/javatests/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ ERROR_PRONE_SUPPRESSIONS = [
3131
"-Xep:DoNotCall:OFF",
3232
"-Xep:EqualsIncompatibleType:OFF",
3333
"-Xep:IdentityBinaryExpression:OFF",
34-
"-Xep:MixedArrayDimensions:OFF", # See go/lsc-mixedarraydimensions
3534
"-Xep:ReturnValueIgnored:OFF",
3635
"-Xep:SelfAssertion:OFF",
3736
"-Xep:SelfComparison:OFF",

jre/javatests/com/google/j2cl/jre/java/math/BigDecimalArithmeticTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public void testDivideAndRemainder1() {
216216
int remScale = 70;
217217
BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale);
218218
BigDecimal bNumber = new BigDecimal(new BigInteger(b), bScale);
219-
BigDecimal result[] = aNumber.divideAndRemainder(bNumber);
219+
BigDecimal[] result = aNumber.divideAndRemainder(bNumber);
220220
assertEquals("incorrect quotient value", res, result[0].toString());
221221
assertEquals("incorrect quotient scale", resScale, result[0].scale());
222222
assertEquals("incorrect remainder value", rem, result[1].toString());
@@ -238,7 +238,7 @@ public void testDivideAndRemainder2() {
238238
int remScale = 70;
239239
BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale);
240240
BigDecimal bNumber = new BigDecimal(new BigInteger(b), bScale);
241-
BigDecimal result[] = aNumber.divideAndRemainder(bNumber);
241+
BigDecimal[] result = aNumber.divideAndRemainder(bNumber);
242242
assertEquals("incorrect quotient value", res, result[0].toString());
243243
assertEquals("incorrect quotient scale", resScale, result[0].scale());
244244
assertEquals("incorrect remainder value", rem, result[1].toString());
@@ -260,7 +260,7 @@ public void testDivideAndRemainderMathContextDOWN() {
260260
int remScale = 45;
261261
BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale);
262262
BigDecimal bNumber = new BigDecimal(new BigInteger(b), bScale);
263-
BigDecimal result[] = aNumber.divideAndRemainder(bNumber, mc);
263+
BigDecimal[] result = aNumber.divideAndRemainder(bNumber, mc);
264264
assertEquals("incorrect quotient value", res, result[0].toString());
265265
assertEquals("incorrect quotient scale", resScale, result[0].scale());
266266
assertEquals("incorrect remainder value", rem, result[1].toString());
@@ -282,7 +282,7 @@ public void testDivideAndRemainderMathContextUP() {
282282
int remScale = 70;
283283
BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale);
284284
BigDecimal bNumber = new BigDecimal(new BigInteger(b), bScale);
285-
BigDecimal result[] = aNumber.divideAndRemainder(bNumber, mc);
285+
BigDecimal[] result = aNumber.divideAndRemainder(bNumber, mc);
286286
assertEquals("incorrect quotient value", res, result[0].toString());
287287
assertEquals("incorrect quotient scale", resScale, result[0].scale());
288288
assertEquals("incorrect remainder value", rem, result[1].toString());

jre/javatests/com/google/j2cl/jre/java/math/BigDecimalConstructorsTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void testConstrBIScale() {
9898

9999
/** new BigDecimal(char[] value). */
100100
public void testConstrChar() {
101-
char value[] = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
101+
char[] value = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
102102
BigDecimal result = new BigDecimal(value);
103103
String res = "-1.23804738E-419";
104104
int resScale = 427;
@@ -110,7 +110,7 @@ public void testConstrChar() {
110110

111111
/** new BigDecimal(char[] value, int offset, int len). */
112112
public void testConstrCharIntInt() {
113-
char value[] = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
113+
char[] value = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
114114
int offset = 3;
115115
int len = 12;
116116
BigDecimal result = new BigDecimal(value, offset, len);
@@ -124,7 +124,7 @@ public void testConstrCharIntInt() {
124124

125125
/** new BigDecimal(char[] value, int offset, int len, MathContext mc). */
126126
public void testConstrCharIntIntMathContext() {
127-
char value[] = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
127+
char[] value = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
128128
int offset = 3;
129129
int len = 12;
130130
int precision = 4;
@@ -143,7 +143,7 @@ public void testConstrCharIntIntMathContext() {
143143

144144
/** new BigDecimal(char[] value, int offset, int len, MathContext mc). */
145145
public void testConstrCharIntIntMathContextException1() {
146-
char value[] = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
146+
char[] value = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
147147
int offset = 3;
148148
int len = 120;
149149
int precision = 4;
@@ -154,7 +154,7 @@ public void testConstrCharIntIntMathContextException1() {
154154

155155
/** new BigDecimal(char[] value, int offset, int len, MathContext mc). */
156156
public void testConstrCharIntIntMathContextException2() {
157-
char value[] = {'-', '1', '2', '3', '8', '0', ',', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
157+
char[] value = {'-', '1', '2', '3', '8', '0', ',', '4', '7', '3', '8', 'E', '-', '4', '2', '3'};
158158
int offset = 3;
159159
int len = 120;
160160
int precision = 4;
@@ -165,7 +165,7 @@ public void testConstrCharIntIntMathContextException2() {
165165

166166
/** new BigDecimal(char[] value, MathContext mc). */
167167
public void testConstrCharMathContext() {
168-
char value[] = {'3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2'};
168+
char[] value = {'3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2'};
169169
int precision = 4;
170170
RoundingMode rm = RoundingMode.CEILING;
171171
MathContext mc = new MathContext(precision, rm);

0 commit comments

Comments
 (0)