Skip to content
Snippets Groups Projects
Commit 7e78179b authored by Lukas Stadler's avatar Lukas Stadler
Browse files

minor cleanups

parent 71e2a03c
Branches
No related tags found
No related merge requests found
......@@ -52,13 +52,13 @@ public abstract class CRC64 extends RBuiltinNode {
bytes = crc64(bytes);
long l = 0;
for (int i = 0; i < bytes.length; i++) {
l += ((long) bytes[i] & 0xffL) << (8 * i);
l += (bytes[i] & 0xffL) << (8 * i);
}
return RDataFactory.createStringVector(Long.toHexString(l));
}
@TruffleBoundary
private byte[] crc64(byte[] bytes) {
private static byte[] crc64(byte[] bytes) {
org.tukaani.xz.check.CRC64 crc = new org.tukaani.xz.check.CRC64();
crc.update(bytes);
return crc.finish();
......
......@@ -55,7 +55,7 @@ public class TestTestBase extends TestBase {
getCode("cat('Warning message: In .Internal(foo(42)): IgnoreWarningContext diff message')", "cat('Warning message in foo(42): IgnoreWarningContext should fail')"));
}
private String getCode(String fastr, String gnur) {
private static String getCode(String fastr, String gnur) {
return "if (exists('.fastr.identity')) { " + fastr + " } else { " + gnur + " }";
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment