Skip to content

Commit b6ac363

Browse files
committed
Style fixes
1 parent a4ac17a commit b6ac363

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/replacements/test/StringCompressInflateTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,13 @@ public void testStringUTF16CompressCharByte() throws ClassNotFoundException {
300300
}
301301

302302
// Exhaustively check compress returning the correct index of the non-latin1 char.
303-
final int SIZE = 48;
304-
final byte FILL_BYTE = 'R';
305-
char[] chars = new char[SIZE];
303+
final int size = 48;
304+
final byte fillByte = 'R';
305+
char[] chars = new char[size];
306306
final byte[] bytes = new byte[chars.length];
307-
Arrays.fill(bytes, FILL_BYTE);
308-
for (int i = 0; i < SIZE; i++) { // Every starting index
309-
for (int j = i; j < SIZE; j++) { // Every location of non-latin1
307+
Arrays.fill(bytes, fillByte);
308+
for (int i = 0; i < size; i++) { // Every starting index
309+
for (int j = i; j < size; j++) { // Every location of non-latin1
310310
Arrays.fill(chars, 'A');
311311
chars[j] = 0xFF21;
312312
byte[] dst = Arrays.copyOf(bytes, bytes.length);
@@ -316,7 +316,7 @@ public void testStringUTF16CompressCharByte() throws ClassNotFoundException {
316316
Assert.assertEquals(result, result2);
317317
Assert.assertArrayEquals(dst, dst2);
318318
Assert.assertEquals("compress found wrong index", j - i, result);
319-
Assert.assertEquals("extra character stored", FILL_BYTE, bytes[j]);
319+
Assert.assertEquals("extra character stored", fillByte, bytes[j]);
320320
}
321321
}
322322
}

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/aarch64/AArch64EncodeArrayOp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm
111111
}
112112

113113
public static void emitEncodeArrayOp(AArch64MacroAssembler masm, Register res, Register src, Register dst, Register len, Value[] vectorRegisters, CharsetName charset) {
114-
GraalError.guarantee(charset == CharsetName.ASCII || charset == CharsetName.ISO_8859_1, charset.toString());
114+
GraalError.guarantee(charset == CharsetName.ASCII || charset == CharsetName.ISO_8859_1, "unsupported charset: %s", charset);
115115
boolean ascii = charset == CharsetName.ASCII;
116116

117117
Register vtmp0 = asRegister(vectorRegisters[0]);

0 commit comments

Comments
 (0)