From 87e7beb4a835d27d0eb741383261b245ee919c5c Mon Sep 17 00:00:00 2001 From: Peter Lawrey Date: Tue, 7 May 2024 18:48:14 +0100 Subject: [PATCH] Fix newlines --- .mvn/wrapper/MavenWrapperDownloader.java | 1 - src/main/java/net/openhft/hashing/CityAndFarmHash_1_1.java | 1 - src/main/java/net/openhft/hashing/MurmurHash_3.java | 1 - src/test/java/net/openhft/hashing/City64_1_1_Test.java | 1 - src/test/java/net/openhft/hashing/FarmHashTest.java | 1 - src/test/java/net/openhft/hashing/LongHashFunctionTest.java | 1 - .../java/net/openhft/hashing/LongTupleHashFunctionTest.java | 1 - src/test/java/net/openhft/hashing/MetroHashTest.java | 3 +-- src/test/java/net/openhft/hashing/MurmurHash3Test.java | 1 - src/test/java/net/openhft/hashing/OriginalFarmHashTest.java | 3 +-- src/test/java/net/openhft/hashing/WyHashTest.java | 1 - src/test/java/net/openhft/hashing/XXH128Test.java | 1 - src/test/java/net/openhft/hashing/XXH3Test.java | 2 -- src/test/java/net/openhft/hashing/XxHashTest.java | 1 - 14 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java index b901097..4630de8 100644 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -113,5 +113,4 @@ protected PasswordAuthentication getPasswordAuthentication() { fos.close(); rbc.close(); } - } diff --git a/src/main/java/net/openhft/hashing/CityAndFarmHash_1_1.java b/src/main/java/net/openhft/hashing/CityAndFarmHash_1_1.java index 5cb6789..4815b72 100644 --- a/src/main/java/net/openhft/hashing/CityAndFarmHash_1_1.java +++ b/src/main/java/net/openhft/hashing/CityAndFarmHash_1_1.java @@ -320,7 +320,6 @@ static LongHashFunction asLongHashFunctionWithTwoSeeds(long seed0, long seed1) { return new AsLongHashFunctionSeeded(seed0, seed1); } - // FarmHash private static long naHashLen33To64(Access access, T in, long off, long len) { diff --git a/src/main/java/net/openhft/hashing/MurmurHash_3.java b/src/main/java/net/openhft/hashing/MurmurHash_3.java index b614a5d..85b4ba8 100644 --- a/src/main/java/net/openhft/hashing/MurmurHash_3.java +++ b/src/main/java/net/openhft/hashing/MurmurHash_3.java @@ -182,7 +182,6 @@ private static long finalize(long length, long h1, long h2, @Nullable long[] res h1 = fmix64(h1); h2 = fmix64(h2); - if (null != result) { h1 += h2; result[0] = h1; diff --git a/src/test/java/net/openhft/hashing/City64_1_1_Test.java b/src/test/java/net/openhft/hashing/City64_1_1_Test.java index 60be1e5..474efae 100644 --- a/src/test/java/net/openhft/hashing/City64_1_1_Test.java +++ b/src/test/java/net/openhft/hashing/City64_1_1_Test.java @@ -51,7 +51,6 @@ public void testCityWithOneSeed() { test(LongHashFunction.city_1_1(0L, 0L), HASHES_OF_LOOPING_BYTES_WITH_SEEDS_0_0); } - public void test(LongHashFunction city, long[] hashesOfLoopingBytes) { byte[] data = new byte[len]; for (int j = 0; j < data.length; j++) { diff --git a/src/test/java/net/openhft/hashing/FarmHashTest.java b/src/test/java/net/openhft/hashing/FarmHashTest.java index fbb5302..e4c4eee 100644 --- a/src/test/java/net/openhft/hashing/FarmHashTest.java +++ b/src/test/java/net/openhft/hashing/FarmHashTest.java @@ -59,5 +59,4 @@ public void testNa() { LongHashFunctionTest.test(f, data, f.hashBytes(data)); } } - } diff --git a/src/test/java/net/openhft/hashing/LongHashFunctionTest.java b/src/test/java/net/openhft/hashing/LongHashFunctionTest.java index 2106299..9ab229b 100644 --- a/src/test/java/net/openhft/hashing/LongHashFunctionTest.java +++ b/src/test/java/net/openhft/hashing/LongHashFunctionTest.java @@ -122,7 +122,6 @@ private static void testArrays(LongHashFunction f, byte[] data, long eh, int len System.arraycopy(shorts, 0, shorts2, 1, shortLen); assertEquals("short array off len", eh, f.hashShorts(shorts2, 1, shortLen)); - char[] chars = new char[shortLen]; bb.asCharBuffer().get(chars); assertEquals("char array", eh, f.hashChars(chars)); diff --git a/src/test/java/net/openhft/hashing/LongTupleHashFunctionTest.java b/src/test/java/net/openhft/hashing/LongTupleHashFunctionTest.java index a7389d9..a30e1e0 100644 --- a/src/test/java/net/openhft/hashing/LongTupleHashFunctionTest.java +++ b/src/test/java/net/openhft/hashing/LongTupleHashFunctionTest.java @@ -158,7 +158,6 @@ private static void testArrays(LongTupleHashFunction f, byte[] data, long[] eh, System.arraycopy(shorts, 0, shorts2, 1, shortLen); assertArrayEquals("short array off len", eh, f.hashShorts(shorts2, 1, shortLen)); - char[] chars = new char[shortLen]; bb.asCharBuffer().get(chars); assertArrayEquals("char array", eh, f.hashChars(chars)); diff --git a/src/test/java/net/openhft/hashing/MetroHashTest.java b/src/test/java/net/openhft/hashing/MetroHashTest.java index 2e77f64..70dc196 100644 --- a/src/test/java/net/openhft/hashing/MetroHashTest.java +++ b/src/test/java/net/openhft/hashing/MetroHashTest.java @@ -22,7 +22,6 @@ public static Collection data() { @Parameterized.Parameter public int len; - @Test public void testMetroWithoutSeeds() { test(LongHashFunction.metro(), HASHES_OF_LOOPING_BYTES_WITHOUT_SEED); @@ -2123,4 +2122,4 @@ public void test(LongHashFunction metro, long[] hashesOfLoopingBytes) { 2937352060494234522L, -2470412390340197582L }; -} \ No newline at end of file +} diff --git a/src/test/java/net/openhft/hashing/MurmurHash3Test.java b/src/test/java/net/openhft/hashing/MurmurHash3Test.java index 2241afa..38d08c2 100644 --- a/src/test/java/net/openhft/hashing/MurmurHash3Test.java +++ b/src/test/java/net/openhft/hashing/MurmurHash3Test.java @@ -16,7 +16,6 @@ package net.openhft.hashing; - import com.google.common.hash.HashFunction; import com.google.common.hash.Hashing; import org.junit.Test; diff --git a/src/test/java/net/openhft/hashing/OriginalFarmHashTest.java b/src/test/java/net/openhft/hashing/OriginalFarmHashTest.java index 15d6111..de35ed8 100644 --- a/src/test/java/net/openhft/hashing/OriginalFarmHashTest.java +++ b/src/test/java/net/openhft/hashing/OriginalFarmHashTest.java @@ -133,7 +133,6 @@ static int testUo(int offset, int len, int expectedIndex) { return expectedIndex; } - @Test public void testUoGo() { for (Object[] g : GOLDEN_64) { @@ -1268,7 +1267,7 @@ public void testUoGo() { 4144237690L, 3350490823L, 4166253320L, 2747410691L, }; - + static final long[] UO_EXPECTED = { 3277735313L, 2681724312L, 2598464059L, 797982799L, diff --git a/src/test/java/net/openhft/hashing/WyHashTest.java b/src/test/java/net/openhft/hashing/WyHashTest.java index 3447a8e..b56a8ed 100644 --- a/src/test/java/net/openhft/hashing/WyHashTest.java +++ b/src/test/java/net/openhft/hashing/WyHashTest.java @@ -31,7 +31,6 @@ public void testWyHasWithOneSeed() { test(LongHashFunction.wy_3(42L), HASHES_OF_LOOPING_BYTES_WITH_SEED_42); } - public void test(LongHashFunction wyHash, long[] hashesOfLoopingBytes) { byte[] data = new byte[len]; for (int j = 0; j < data.length; j++) { diff --git a/src/test/java/net/openhft/hashing/XXH128Test.java b/src/test/java/net/openhft/hashing/XXH128Test.java index a153ea1..5fbc842 100644 --- a/src/test/java/net/openhft/hashing/XXH128Test.java +++ b/src/test/java/net/openhft/hashing/XXH128Test.java @@ -61,7 +61,6 @@ public void test(LongTupleHashFunction h, LongHashFunction hl, long[][] hashesOf LongHashFunctionTest.test(hl, data, hashesOfLoopingBytes[len][0]); } } - /** * Test data is output of the following program with xxh3 implementation * from https://github.com/Cyan4973/xxHash diff --git a/src/test/java/net/openhft/hashing/XXH3Test.java b/src/test/java/net/openhft/hashing/XXH3Test.java index b53aeea..4f01800 100644 --- a/src/test/java/net/openhft/hashing/XXH3Test.java +++ b/src/test/java/net/openhft/hashing/XXH3Test.java @@ -52,7 +52,6 @@ public void testXXH3WithOneSeed() { test(LongHashFunction.xx3(42L), XXH3Test_HASHES.HASHES_OF_LOOPING_BYTES_WITH_SEED_42); } - public void test(LongHashFunction h, long[] hashesOfLoopingBytes) { byte[] data = new byte[len]; for (int j = 0; j < data.length; j++) { @@ -61,7 +60,6 @@ public void test(LongHashFunction h, long[] hashesOfLoopingBytes) { LongHashFunctionTest.test(h, data, hashesOfLoopingBytes[len]); } } - /** * Test data is output of the following program with xxh3 implementation * from https://github.com/Cyan4973/xxHash diff --git a/src/test/java/net/openhft/hashing/XxHashTest.java b/src/test/java/net/openhft/hashing/XxHashTest.java index 8d5d43e..a49aef3 100644 --- a/src/test/java/net/openhft/hashing/XxHashTest.java +++ b/src/test/java/net/openhft/hashing/XxHashTest.java @@ -48,7 +48,6 @@ public void testCityWithOneSeed() { test(LongHashFunction.xx(42L), HASHES_OF_LOOPING_BYTES_WITH_SEED_42); } - public void test(LongHashFunction city, long[] hashesOfLoopingBytes) { byte[] data = new byte[len]; for (int j = 0; j < data.length; j++) {