Open KingBoomie opened 5 years ago
@KingBoomie The byte-array is modified after the first run of the hash pass:
@Test
public void test() {
byte[] data2 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1};
byte[] data3 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1};
final long seed = new Random().nextLong();
long[] initial = Murmur3.hash_x64_128(data2, data2.length, seed);
System.out.println(Arrays.toString(data2));
Assert.assertArrayEquals(data2, data3); // this fails
}
The data2
is modified to:
[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1]
I will debug further to see why this happens.
Running in jshell
returns
Expected all return values to be equal. running OracleJDK 12.0.2.