You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/02/17 14:10:30 UTC

[commons-collections] branch master updated (d5bf768 -> d31ebdd)

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git.


    from d5bf768  [COLLECTIONS-748] Let org.apache.commons.collections4.properties.[Sorted]PropertiesFactory accept XML input.
     new a3e2ea2  Remove methods from the javadoc that are not implemented.
     new 28b3810  Eliminate extra lines.
     new 2a0e867  Remove javadoc from override method.
     new 82273e9  Added orCardinality to BitSetBloomFilter.
     new 5f70948  Remove whitespace around parentheses.
     new b377f59  Remove extra lines.
     new fa02826  Remove unthrown exception from test setup().
     new 373a241  Removed invalid javadoc.
     new 4033ff6  Test code clean-up.
     new 1f17189  Remove unthrown exception.
     new 7aaf396  Correct test javadoc headers.
     new d31ebdd  Javadoc clean-up.

The 12 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../bloomfilter/AbstractBloomFilter.java           |  11 +-
 .../bloomfilter/BitSetBloomFilter.java             |  22 +-
 .../collections4/bloomfilter/BloomFilter.java      |   4 -
 .../bloomfilter/CountingBloomFilter.java           |  19 +-
 .../bloomfilter/HasherBloomFilter.java             |   1 -
 .../collections4/bloomfilter/SetOperations.java    |   1 -
 .../bloomfilter/hasher/DynamicHasher.java          |   2 -
 .../bloomfilter/hasher/HashFunction.java           |   2 -
 .../bloomfilter/hasher/HashFunctionIdentity.java   |  48 +++--
 .../hasher/HashFunctionIdentityImpl.java           |   5 +-
 .../collections4/bloomfilter/hasher/Hasher.java    |   5 +-
 .../collections4/bloomfilter/hasher/Shape.java     |   5 +-
 .../bloomfilter/hasher/function/MD5Cyclic.java     |   1 -
 .../hasher/function/Murmur128x86Cyclic.java        |   2 -
 .../hasher/function/ObjectsHashIterative.java      |   1 -
 .../bloomfilter/AbstractBloomFilterTest.java       |   5 +-
 .../bloomfilter/BitSetBloomFilterTest.java         |   7 +-
 .../bloomfilter/CountingBloomFilterTest.java       | 239 +++++++++------------
 .../bloomfilter/DefaultBloomFilterMethodsTest.java |   5 +-
 .../bloomfilter/HasherBloomFilterTest.java         |   9 +-
 .../bloomfilter/SetOperationsTest.java             |  24 +--
 .../bloomfilter/hasher/CommonComparatorTest.java   |   9 +-
 .../bloomfilter/hasher/DeepComparatorTest.java     |   9 +-
 .../hasher/DynamicHasherBuilderTest.java           |   9 +-
 .../bloomfilter/hasher/DynamicHasherTest.java      |  11 +-
 .../hasher/HashFunctionIdentityImplTest.java       |  10 +-
 .../collections4/bloomfilter/hasher/ShapeTest.java |  13 +-
 .../bloomfilter/hasher/StaticHasherTest.java       |  12 +-
 .../bloomfilter/hasher/function/MD5CyclicTest.java |   2 -
 .../hasher/function/Murmur128x86CyclicTest.java    |   2 -
 .../hasher/function/Murmur32x86IterativeTest.java  |   2 -
 .../hasher/function/ObjectsHashIterativeTest.java  |   4 +-
 32 files changed, 184 insertions(+), 317 deletions(-)


[commons-collections] 08/12: Removed invalid javadoc.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 373a241752e97897f55ad75e0a5919501a25d380
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:30:40 2020 +0000

    Removed invalid javadoc.
---
 .../bloomfilter/hasher/HashFunctionIdentityImplTest.java            | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
index 04b3651..01f68e0 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
@@ -72,12 +72,6 @@ public class HashFunctionIdentityImplTest {
 
     /**
      * Test the constructor from component values.
-     * 
-     * @param provider the name of the provider.
-     * @param name the name of the hash function.
-     * @param signedness the signedness of the hash function.
-     * @param process the processes of the hash function.
-     * @param signature the signature for the hash function.
      */
     @Test
     public void valuesConstructorTest() {


[commons-collections] 01/12: Remove methods from the javadoc that are not implemented.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit a3e2ea24439d0b35de5809e07c98e221ab921436
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 11:44:28 2020 +0000

    Remove methods from the javadoc that are not implemented.
    
    These methods have been moved from AbstractBloomFilter to SetOperations.
---
 .../commons/collections4/bloomfilter/AbstractBloomFilter.java  | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
index 331afa7..d805182 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
@@ -33,15 +33,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;
  * This abstract class provides additional functionality not declared in the interface.
  * Specifically:
  * <ul>
- * <li>orCardinality</li>
- * <li>jaccardSimilarity</li>
- * <li>jaccardDistance</li>
- * <li>cosineSimilarity</li>
- * <li>cosineDistance</li>
- * <li>estimateSize</li>
- * <li>estimateUnionSize</li>
- * <li>estimateIntersectionSize</li>
- * <li>isFull</li>
+ * <li>{@link #isFull()}</li>
  * </ul>
  *
  * @since 4.5


[commons-collections] 06/12: Remove extra lines.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit b377f59613947a311a2fc3105dc7ae14b9343f24
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:24:03 2020 +0000

    Remove extra lines.
---
 .../collections4/bloomfilter/hasher/DynamicHasher.java     |  1 -
 .../bloomfilter/hasher/HashFunctionIdentity.java           |  3 ---
 .../commons/collections4/bloomfilter/hasher/Hasher.java    |  1 -
 .../commons/collections4/bloomfilter/hasher/Shape.java     |  3 ---
 .../collections4/bloomfilter/AbstractBloomFilterTest.java  |  2 --
 .../collections4/bloomfilter/BitSetBloomFilterTest.java    |  4 ----
 .../collections4/bloomfilter/CountingBloomFilterTest.java  | 14 --------------
 .../bloomfilter/DefaultBloomFilterMethodsTest.java         |  2 --
 .../collections4/bloomfilter/HasherBloomFilterTest.java    |  1 -
 .../collections4/bloomfilter/SetOperationsTest.java        | 13 -------------
 .../bloomfilter/hasher/CommonComparatorTest.java           |  2 --
 .../bloomfilter/hasher/DeepComparatorTest.java             |  2 --
 .../bloomfilter/hasher/DynamicHasherBuilderTest.java       |  1 -
 .../collections4/bloomfilter/hasher/DynamicHasherTest.java |  3 ---
 .../bloomfilter/hasher/HashFunctionIdentityImplTest.java   |  1 -
 .../commons/collections4/bloomfilter/hasher/ShapeTest.java |  5 -----
 .../collections4/bloomfilter/hasher/StaticHasherTest.java  |  4 ----
 .../bloomfilter/hasher/function/MD5CyclicTest.java         |  1 -
 .../hasher/function/Murmur128x86CyclicTest.java            |  1 -
 .../hasher/function/Murmur32x86IterativeTest.java          |  1 -
 .../hasher/function/ObjectsHashIterativeTest.java          |  1 -
 21 files changed, 66 deletions(-)

diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
index 9036d79..56be62b 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
@@ -81,7 +81,6 @@ public class DynamicHasher implements Hasher {
         public final Builder with(final String property) {
             return with(property.getBytes(StandardCharsets.UTF_8));
         }
-
     }
 
     /**
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
index 00170e0..3b14b84 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
@@ -52,7 +52,6 @@ public interface HashFunctionIdentity {
      * HashFunctionIdentity name, signedness, and process.
      */
     Comparator<HashFunctionIdentity> COMMON_COMPARATOR = new Comparator<HashFunctionIdentity>() {
-
         @Override
         public int compare(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
             int result = identity1.getName().compareToIgnoreCase(identity2.getName());
@@ -71,7 +70,6 @@ public interface HashFunctionIdentity {
      * HashFunctionIdentity name, signedness, process, and privider..
      */
     Comparator<HashFunctionIdentity> DEEP_COMPARATOR = new Comparator<HashFunctionIdentity>() {
-
         @Override
         public int compare(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
             int result = COMMON_COMPARATOR.compare(identity1, identity2);
@@ -109,7 +107,6 @@ public interface HashFunctionIdentity {
        return String.format("%s-%s-%s",
            identity.getName().toUpperCase(Locale.ROOT), identity.getSignedness(),
            identity.getProcessType() ).getBytes(StandardCharsets.UTF_8);
-
     }
 
     /**
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
index 224902b..523438c 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
@@ -74,7 +74,6 @@ public interface Hasher {
          * @see #getBits(Shape)
          */
         Builder with(String property);
-
     }
 
     /**
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
index b3ac6ed..b241650 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
@@ -167,7 +167,6 @@ public class Shape {
         this.hashCode = generateHashCode();
         // check that probability is within range
         getProbability();
-
     }
 
     /**
@@ -193,7 +192,6 @@ public class Shape {
         this.hashCode = generateHashCode();
         // check that probability is within range
         getProbability();
-
     }
 
     /**
@@ -224,7 +222,6 @@ public class Shape {
         this.hashCode = generateHashCode();
         // check that probability is within range
         getProbability();
-
     }
 
     /**
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
index 9608373..a338899 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
@@ -365,7 +365,6 @@ public abstract class AbstractBloomFilterTest {
         hasher2 = new StaticHasher(values.iterator(), shape);
         filter = createFilter(hasher2, shape);
         assertFalse(filter.isFull());
-
     }
 
     /**
@@ -519,5 +518,4 @@ public abstract class AbstractBloomFilterTest {
         assertEquals(20, bf.xorCardinality(bf2));
         assertEquals(20, bf2.xorCardinality(bf));
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
index 51c1027..9fc4995 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
@@ -57,7 +57,6 @@ public class BitSetBloomFilterTest extends AbstractBloomFilterTest {
         bf2 = createFilter(hasher2, shape);
         assertEquals(0, bf.andCardinality(bf2));
         assertEquals(0, bf2.andCardinality(bf));
-
     }
 
     @Override
@@ -88,7 +87,6 @@ public class BitSetBloomFilterTest extends AbstractBloomFilterTest {
         bf.merge(bf2);
 
         assertEquals(27, bf.cardinality());
-
     }
 
     /**
@@ -116,7 +114,5 @@ public class BitSetBloomFilterTest extends AbstractBloomFilterTest {
         bf2 = createFilter(hasher2, shape);
         assertEquals(15, bf.xorCardinality(bf2));
         assertEquals(15, bf2.xorCardinality(bf));
-
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
index c59dd9b..11cdeee 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
@@ -37,7 +37,6 @@ import org.junit.Test;
  */
 public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
-
     /**
      * Tests that the andCardinality calculation executes correctly when using a
      * CountingBloomFilter argument.
@@ -64,8 +63,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         bf2 = createFilter(hasher2, shape);
         assertEquals(0, bf.andCardinality(bf2));
         assertEquals(0, bf2.andCardinality(bf));
-
-
     }
 
     /**
@@ -81,7 +78,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         assertEquals(0x1FFFF, lb[0]);
         assertEquals(1, lb.length);
 
-
         assertEquals(17, bf.getCounts().count());
         assertEquals(Integer.valueOf(1), bf.getCounts().map(Map.Entry::getValue).max(Integer::compare).get());
         assertEquals(Integer.valueOf(1), bf.getCounts().map(Map.Entry::getValue).min(Integer::compare).get());
@@ -129,7 +125,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         {
             // expected
         }
-
     }
 
     @Override
@@ -142,7 +137,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         return new CountingBloomFilter(hasher, shape);
     }
 
-
     /**
      * Tests that merge correctly updates the counts when a CountingBloomFilter is passed
      */
@@ -219,7 +213,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
                 assertEquals("Wrong value for "+i, expected[i], m.get(i).intValue());
             }
         }
-
     }
 
     /**
@@ -233,7 +226,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         CountingBloomFilter bf = createFilter(hasher, shape);
 
-
         final Map<Integer,Integer> map = new HashMap<>();
         bf.getCounts().forEach(e -> map.put(e.getKey(), e.getValue()));
         map.put(1, Integer.MAX_VALUE);
@@ -328,7 +320,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
             assertNotNull(map2.get(i));
             assertEquals(1, map2.get(i).intValue());
         }
-
     }
 
     /**
@@ -352,7 +343,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
-
         bf.remove(hasher);
         assertEquals(17, bf.cardinality());
         final Map<Integer,Integer> map2 = new HashMap<>();
@@ -363,7 +353,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
             assertNotNull(map2.get(i));
             assertEquals(1, map2.get(i).intValue());
         }
-
     }
 
     /**
@@ -398,7 +387,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
             assertNotNull(map2.get(i));
             assertEquals(1, map2.get(i).intValue());
         }
-
     }
 
     /**
@@ -412,7 +400,6 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         CountingBloomFilter bf = createFilter(hasher, shape);
 
-
         final Map<Integer,Integer> map = new HashMap<>();
         bf.getCounts().forEach(e -> map.put(e.getKey(), e.getValue()));
         map.remove(1);
@@ -435,5 +422,4 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
             // do nothing
         }
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
index 2c6fd2d..c1f248d 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
@@ -84,7 +84,6 @@ public class DefaultBloomFilterMethodsTest extends AbstractBloomFilterTest {
             verifyHasher(hasher);
             hasher.getBits(getShape()).forEachRemaining((IntConsumer) bitSet::set);
         }
-
     }
 
     @Override
@@ -96,5 +95,4 @@ public class DefaultBloomFilterMethodsTest extends AbstractBloomFilterTest {
     protected AbstractBloomFilter createFilter(final Hasher hasher, final Shape shape) {
         return new BF(hasher, shape);
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
index 2c398b4..c0c4902 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
@@ -57,5 +57,4 @@ public class HasherBloomFilterTest extends AbstractBloomFilterTest {
     protected HasherBloomFilter createFilter(final Hasher hasher, final Shape shape) {
         return new HasherBloomFilter(hasher, shape);
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
index a8fc4eb..233ec42 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
@@ -95,7 +95,6 @@ public class SetOperationsTest {
 
         assertEquals(0.514928749927334, SetOperations.cosineDistance(filter1, filter2), 0.000000000000001);
         assertEquals(0.514928749927334, SetOperations.cosineDistance(filter2, filter1), 0.000000000000001);
-
     }
 
     /**
@@ -115,7 +114,6 @@ public class SetOperationsTest {
         assertEquals(1.0, SetOperations.cosineDistance(filter2, filter1), 0.0001);
         assertEquals(1.0, SetOperations.cosineDistance(filter1, filter3), 0.0001);
         assertEquals(1.0, SetOperations.cosineDistance(filter3, filter1), 0.0001);
-
     }
 
     /**
@@ -140,7 +138,6 @@ public class SetOperationsTest {
 
         assertEquals(0.485071250072666, SetOperations.cosineSimilarity(filter1, filter2), 0.000000000000001);
         assertEquals(0.485071250072666, SetOperations.cosineSimilarity(filter2, filter1), 0.000000000000001);
-
     }
 
     /**
@@ -160,7 +157,6 @@ public class SetOperationsTest {
         assertEquals(0.0, SetOperations.cosineSimilarity(filter2, filter1), 0.0001);
         assertEquals(0.0, SetOperations.cosineSimilarity(filter1, filter3), 0.0001);
         assertEquals(0.0, SetOperations.cosineSimilarity(filter3, filter1), 0.0001);
-
     }
 
     /**
@@ -180,7 +176,6 @@ public class SetOperationsTest {
 
         final long estimate = SetOperations.estimateIntersectionSize(filter1, filter2);
         assertEquals(1, estimate);
-
     }
 
     /**
@@ -207,10 +202,8 @@ public class SetOperationsTest {
         final BloomFilter filter2 = new HasherBloomFilter(hasher2, shape);
 
         assertEquals(3, SetOperations.estimateSize(filter2));
-
     }
 
-
     /**
      * Tests that the union size estimate is correctly calculated.
      */
@@ -228,7 +221,6 @@ public class SetOperationsTest {
 
         final long estimate = SetOperations.estimateUnionSize(filter1, filter2);
         assertEquals(3, estimate);
-
     }
 
     /**
@@ -253,10 +245,8 @@ public class SetOperationsTest {
 
         assertEquals(17, SetOperations.hammingDistance(filter1, filter2));
         assertEquals(17, SetOperations.hammingDistance(filter2, filter1));
-
     }
 
-
     /**
      * Tests that the Jaccard distance is correctly calculated.
      */
@@ -279,7 +269,6 @@ public class SetOperationsTest {
 
         assertEquals(0.32, SetOperations.jaccardDistance(filter1, filter2), 0.001);
         assertEquals(0.32, SetOperations.jaccardDistance(filter2, filter1), 0.001);
-
     }
 
     /**
@@ -299,7 +288,6 @@ public class SetOperationsTest {
         assertEquals(1.0, SetOperations.jaccardDistance(filter2, filter1), 0.0001);
         assertEquals(0.0, SetOperations.jaccardDistance(filter1, filter3), 0.0001);
         assertEquals(0.0, SetOperations.jaccardDistance(filter3, filter1), 0.0001);
-
     }
 
     /**
@@ -343,6 +331,5 @@ public class SetOperationsTest {
         assertEquals(0.0, SetOperations.jaccardSimilarity(filter2, filter1), 0.0001);
         assertEquals(1.0, SetOperations.jaccardSimilarity(filter1, filter3), 0.0001);
         assertEquals(1.0, SetOperations.jaccardSimilarity(filter3, filter1), 0.0001);
-
     }
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
index 3c326d7..183bc02 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
@@ -54,7 +54,6 @@ public class CommonComparatorTest {
             ProcessType.CYCLIC, 300L);
 
         assertEquals(0, HashFunctionIdentity.COMMON_COMPARATOR.compare(impl1, impl2));
-
     }
 
     /**
@@ -160,5 +159,4 @@ public class CommonComparatorTest {
             assertEquals("Unexpected order for " + HashFunctionIdentity.asCommonString(id), idx++, id.getSignature());
         }
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
index e8649fd..b456930 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
@@ -54,7 +54,6 @@ public class DeepComparatorTest {
             ProcessType.CYCLIC, 300L);
 
         assertEquals(0, HashFunctionIdentity.DEEP_COMPARATOR.compare(impl1, impl2));
-
     }
 
     /**
@@ -187,5 +186,4 @@ public class DeepComparatorTest {
                 idx++, id.getSignature());
         }
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
index 6aa0bac..a63e911 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
@@ -66,7 +66,6 @@ public class DynamicHasherBuilderTest {
         assertTrue(iter.hasNext());
         assertEquals(expected, iter.nextInt());
         assertFalse(iter.hasNext());
-
     }
 
     /**
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
index e8d91d4..fa4efa5 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
@@ -93,7 +93,6 @@ public class DynamicHasherTest {
             assertEquals(element, iter.nextInt());
         }
         assertFalse(iter.hasNext());
-
     }
 
     /**
@@ -113,7 +112,6 @@ public class DynamicHasherTest {
             assertEquals(element, iter.nextInt());
         }
         assertFalse(iter.hasNext());
-
     }
 
     /**
@@ -140,5 +138,4 @@ public class DynamicHasherTest {
         assertTrue(builder.build().isEmpty());
         assertFalse(builder.with("Hello").build().isEmpty());
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
index 7356559..04b3651 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
@@ -89,5 +89,4 @@ public class HashFunctionIdentityImplTest {
         assertEquals(ProcessType.ITERATIVE, impl.getProcessType());
         assertEquals(-2l, impl.getSignature());
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
index af184ce..899cb65 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
@@ -182,7 +182,6 @@ public class ShapeTest {
         assertEquals(4, filterConfig.getNumberOfHashFunctions());
         assertEquals(5, filterConfig.getNumberOfItems());
         assertEquals(0.102194782, filterConfig.getProbability(), 0.000001);
-
     }
 
     /**
@@ -200,7 +199,6 @@ public class ShapeTest {
         assertEquals(3, filterConfig.getNumberOfHashFunctions());
         assertEquals(5, filterConfig.getNumberOfItems());
         assertEquals(0.100375138, filterConfig.getProbability(), 0.000001);
-
     }
 
     /**
@@ -260,7 +258,6 @@ public class ShapeTest {
         assertEquals(3, shape.getNumberOfHashFunctions());
         assertEquals(5, shape.getNumberOfItems());
         assertEquals(0.100375138, shape.getProbability(), 0.000001);
-
     }
 
     /**
@@ -448,7 +445,6 @@ public class ShapeTest {
         };
 
         assertNotEquals(new Shape(testFunction2, 4, 1.0 / 10), shape);
-
     }
 
     /**
@@ -459,5 +455,4 @@ public class ShapeTest {
         final int hashCode = Objects.hash(testFunction, 24, 3);
         assertEquals(hashCode, shape.hashCode());
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
index f622171..30daaa9 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
@@ -244,7 +244,6 @@ public class StaticHasherTest {
         final StaticHasher hasher2 = new StaticHasher(hasher, shape);
         assertEquals(shape, hasher2.getShape());
         assertSameBits(hasher, hasher2);
-
     }
 
     /**
@@ -280,7 +279,6 @@ public class StaticHasherTest {
             assertEquals(i, iter.nextInt());
         }
         assertFalse(iter.hasNext());
-
     }
 
     /**
@@ -317,7 +315,6 @@ public class StaticHasherTest {
         } catch (final IllegalArgumentException expected) {
             // do nothing
         }
-
     }
 
     /**
@@ -328,7 +325,6 @@ public class StaticHasherTest {
         final List<Integer> lst = new ArrayList<>();
         StaticHasher hasher = new StaticHasher(lst.iterator(), shape);
 
-
         assertTrue(hasher.isEmpty());
 
         lst.add( Integer.valueOf(1));
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
index 16c59f4..428c02a 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
@@ -60,5 +60,4 @@ public class MD5CyclicTest {
         final long expected = md5.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
         assertEquals(expected, md5.getSignature());
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
index 61f3a48..6dd9730 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
@@ -62,5 +62,4 @@ public class Murmur128x86CyclicTest {
         final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
         assertEquals(expected, murmur.getSignature());
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
index d15eb5a..96ad132 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
@@ -60,5 +60,4 @@ public class Murmur32x86IterativeTest {
         final long expected = murmur.apply(arg.getBytes(StandardCharsets.UTF_8), 0);
         assertEquals(expected, murmur.getSignature());
     }
-
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
index 9387346..17ebb11 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
@@ -65,5 +65,4 @@ public class ObjectsHashIterativeTest {
         assertEquals(expected, expected2);
         assertEquals(expected, obj.getSignature());
     }
-
 }


[commons-collections] 02/12: Eliminate extra lines.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 28b381008e41875139be04edc27a0d4187454171
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 12:56:53 2020 +0000

    Eliminate extra lines.
---
 .../apache/commons/collections4/bloomfilter/AbstractBloomFilter.java  | 1 -
 .../apache/commons/collections4/bloomfilter/BitSetBloomFilter.java    | 3 ---
 .../java/org/apache/commons/collections4/bloomfilter/BloomFilter.java | 4 ----
 .../apache/commons/collections4/bloomfilter/CountingBloomFilter.java  | 1 -
 .../apache/commons/collections4/bloomfilter/HasherBloomFilter.java    | 1 -
 .../org/apache/commons/collections4/bloomfilter/SetOperations.java    | 1 -
 .../apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java | 1 -
 .../apache/commons/collections4/bloomfilter/hasher/HashFunction.java  | 2 --
 .../commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java | 1 -
 .../collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java     | 1 -
 .../org/apache/commons/collections4/bloomfilter/hasher/Hasher.java    | 1 -
 .../commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java   | 1 -
 .../collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java  | 2 --
 .../bloomfilter/hasher/function/ObjectsHashIterative.java             | 1 -
 14 files changed, 21 deletions(-)

diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
index d805182..992631c 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilter.java
@@ -273,5 +273,4 @@ public abstract class AbstractBloomFilter implements BloomFilter {
         }
         return BitSet.valueOf(result).cardinality();
     }
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
index 63ed587..e7bb69b 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
@@ -115,7 +115,6 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
         }
     }
 
-
     @Override
     public void merge(final Hasher hasher) {
         verifyHasher(hasher);
@@ -127,7 +126,6 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
         return bitSet.toString();
     }
 
-
     @Override
     public int xorCardinality(final BloomFilter other) {
         if (other instanceof BitSetBloomFilter) {
@@ -138,5 +136,4 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
         }
         return super.xorCardinality(other);
     }
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
index 01e6c73..a485f53 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java
@@ -121,8 +121,4 @@ public interface BloomFilter {
      * @return the cardinality of the result of {@code( this XOR other )}
      */
     int xorCardinality(BloomFilter other);
-
-
-
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
index c010af5..ed872e2 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
@@ -33,7 +33,6 @@ import org.apache.commons.collections4.bloomfilter.hasher.Hasher;
 import org.apache.commons.collections4.bloomfilter.hasher.Shape;
 import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;
 
-
 /**
  * A counting Bloom filter.
  * This Bloom filter maintains a count of the number of times a bit has been
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java
index e781179..4ab8c51 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilter.java
@@ -139,5 +139,4 @@ public class HasherBloomFilter extends AbstractBloomFilter {
             hasher.getBits(getShape()));
         this.hasher = new StaticHasher(iter, getShape());
     }
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/SetOperations.java b/src/main/java/org/apache/commons/collections4/bloomfilter/SetOperations.java
index a42e900..80017a3 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/SetOperations.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/SetOperations.java
@@ -69,7 +69,6 @@ public final class SetOperations {
         return estimateSize(first) - estimateUnionSize(first,second) + estimateSize(second);
     }
 
-
     /**
      * Estimates the number of items in the Bloom filter based on the shape and the number
      * of bits that are enabled.
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
index 2b598a8..9036d79 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasher.java
@@ -176,5 +176,4 @@ public class DynamicHasher implements Hasher {
     public boolean isEmpty() {
         return buffers.isEmpty();
     }
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunction.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunction.java
index e8added..11b18e4 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunction.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunction.java
@@ -23,7 +23,6 @@ package org.apache.commons.collections4.bloomfilter.hasher;
  */
 public interface HashFunction extends HashFunctionIdentity {
 
-
     /**
      * Applies the hash function to the buffer.
      *
@@ -32,5 +31,4 @@ public interface HashFunction extends HashFunctionIdentity {
      * @return the long value of the hash.
      */
     long apply(byte[] buffer, int seed);
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
index bdf53fe..65383e1 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
@@ -157,5 +157,4 @@ public interface HashFunctionIdentity {
      * @return signedness of this function.
      */
     Signedness getSignedness();
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
index 93b0d77..a0a047b 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
@@ -84,5 +84,4 @@ public final class HashFunctionIdentityImpl implements HashFunctionIdentity {
     public Signedness getSignedness() {
         return signedness;
     }
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
index 9e46f18..224902b 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
@@ -19,7 +19,6 @@ package org.apache.commons.collections4.bloomfilter.hasher;
 
 import java.util.PrimitiveIterator;
 
-
 /**
  * The class that performs hashing.
  * <p>
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java
index e7f785e..d2aeb49 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5Cyclic.java
@@ -108,5 +108,4 @@ public final class MD5Cyclic implements HashFunction {
     public Signedness getSignedness() {
         return Signedness.SIGNED;
     }
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
index 218a82e..d4782c9 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
@@ -53,7 +53,6 @@ public final class Murmur128x86Cyclic implements HashFunction {
         signature = apply(HashFunctionIdentity.prepareSignatureBuffer(this), 0);
     }
 
-
     @Override
     public long apply(final byte[] buffer, final int seed) {
         if (parts == null || seed == 0) {
@@ -88,5 +87,4 @@ public final class Murmur128x86Cyclic implements HashFunction {
     public Signedness getSignedness() {
         return Signedness.SIGNED;
     }
-
 }
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterative.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterative.java
index b8c4449..ad97aba 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterative.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterative.java
@@ -21,7 +21,6 @@ import java.util.Arrays;
 import org.apache.commons.collections4.bloomfilter.hasher.HashFunction;
 import org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity;
 
-
 /**
  * An implementation of HashFunction that
  * performs {@code Objects.hash} hashing using a signed iterative method.


[commons-collections] 03/12: Remove javadoc from override method.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 2a0e867744a5c52f105992e2ac42ecfe808c92ba
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:00:22 2020 +0000

    Remove javadoc from override method.
    
    The javadoc incorrectly refers to BitSetBloomFilter as the argument.
---
 .../commons/collections4/bloomfilter/BitSetBloomFilter.java       | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
index e7bb69b..e3adbaa 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
@@ -59,14 +59,6 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
         this.bitSet = new BitSet();
     }
 
-    /**
-     * Calculates the andCardinality with another BitSetBloomFilter. <p> This method takes
-     * advantage of internal structures of BitSetBloomFilter. </p>
-     *
-     * @param other the other BitSetBloomFilter.
-     * @return the cardinality of the result of {@code ( this AND other )}.
-     * @see #andCardinality(BloomFilter)
-     */
     @Override
     public int andCardinality(final BloomFilter other) {
         if (other instanceof BitSetBloomFilter) {


[commons-collections] 09/12: Test code clean-up.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 4033ff63c5533a1d1d30667c73c065cb2a3f7a0a
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:34:14 2020 +0000

    Test code clean-up.
    
    Make methods static if possible.
    
    Correct formatting of braces.
---
 .../bloomfilter/CountingBloomFilterTest.java       | 100 ++++++++-------------
 .../bloomfilter/hasher/CommonComparatorTest.java   |   4 +-
 .../bloomfilter/hasher/DeepComparatorTest.java     |   4 +-
 3 files changed, 43 insertions(+), 65 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
index 11cdeee..f6e95dc 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
@@ -88,9 +88,8 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
      */
     @Test
     public void ConstructorTest_Map_CountsTest() {
-        final Map<Integer,Integer> map = new HashMap<>();
-        for (int i =0;i<17;i++)
-        {
+        final Map<Integer, Integer> map = new HashMap<>();
+        for (int i = 0; i < 17; i++) {
             map.put(i, 1);
         }
 
@@ -101,8 +100,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         try {
             bf = new CountingBloomFilter(map, shape);
             fail("Should have thrown IllegalArgumentExceptionW");
-        } catch (final IllegalArgumentException exprected)
-        {
+        } catch (final IllegalArgumentException exprected) {
             // expected
         }
 
@@ -111,8 +109,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         try {
             bf = new CountingBloomFilter(map, shape);
             fail("Should have thrown IllegalArgumentExceptionW");
-        } catch (final IllegalArgumentException exprected)
-        {
+        } catch (final IllegalArgumentException exprected) {
             // expected
         }
 
@@ -121,8 +118,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         try {
             bf = new CountingBloomFilter(map, shape);
             fail("Should have thrown IllegalArgumentExceptionW");
-        } catch (final IllegalArgumentException exprected)
-        {
+        } catch (final IllegalArgumentException exprected) {
             // expected
         }
     }
@@ -152,7 +148,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         final CountingBloomFilter bf = createFilter(hasher, shape);
 
-        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27);
+        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27);
         final Hasher hasher2 = new StaticHasher(lst2.iterator(), shape);
         final BloomFilter bf2 = createFilter(hasher2, shape);
 
@@ -164,14 +160,11 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         final Map<Integer, Integer> m = new HashMap<>();
         bf.getCounts().forEach(e -> m.put(e.getKey(), e.getValue()));
-        for (int i=0;i<29;i++)
-        {
-            if (m.get(i) == null)
-            {
-                assertEquals("Wrong value for "+i, expected[i], 0);
-            } else
-            {
-                assertEquals("Wrong value for "+i, expected[i], m.get(i).intValue());
+        for (int i = 0; i < 29; i++) {
+            if (m.get(i) == null) {
+                assertEquals("Wrong value for " + i, expected[i], 0);
+            } else {
+                assertEquals("Wrong value for " + i, expected[i], m.get(i).intValue());
             }
         }
     }
@@ -191,7 +184,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         final CountingBloomFilter bf = createFilter(hasher, shape);
 
-        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27);
+        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27);
         final Hasher hasher2 = new StaticHasher(lst2.iterator(), shape);
         final BloomFilter bf2 = new BitSetBloomFilter(hasher2, shape);
 
@@ -203,14 +196,11 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         final Map<Integer, Integer> m = new HashMap<>();
         bf.getCounts().forEach(e -> m.put(e.getKey(), e.getValue()));
-        for (int i=0;i<29;i++)
-        {
-            if (m.get(i) == null)
-            {
-                assertEquals("Wrong value for "+i, expected[i], 0);
-            } else
-            {
-                assertEquals("Wrong value for "+i, expected[i], m.get(i).intValue());
+        for (int i = 0; i < 29; i++) {
+            if (m.get(i) == null) {
+                assertEquals("Wrong value for " + i, expected[i], 0);
+            } else {
+                assertEquals("Wrong value for " + i, expected[i], m.get(i).intValue());
             }
         }
     }
@@ -220,13 +210,12 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
      */
     @Test
     public void mergeTest_Overflow() {
-
-        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         CountingBloomFilter bf = createFilter(hasher, shape);
 
-        final Map<Integer,Integer> map = new HashMap<>();
+        final Map<Integer, Integer> map = new HashMap<>();
         bf.getCounts().forEach(e -> map.put(e.getKey(), e.getValue()));
         map.put(1, Integer.MAX_VALUE);
 
@@ -242,9 +231,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         try {
             bf.merge(bf2);
             fail("Should have thrown IllegalStateException");
-        }
-        catch (final IllegalStateException expected)
-        {
+        } catch (final IllegalStateException expected) {
             // do nothing
         }
     }
@@ -260,12 +247,12 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
             1, 1, 1, 1, 1, 1, 1, 1, 0
         };
 
-        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         final CountingBloomFilter bf = createFilter(hasher, shape);
 
-        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27);
+        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27);
         final Hasher hasher2 = new StaticHasher(lst2.iterator(), shape);
 
         bf.merge(hasher2);
@@ -276,14 +263,11 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         final Map<Integer, Integer> m = new HashMap<>();
         bf.getCounts().forEach(e -> m.put(e.getKey(), e.getValue()));
-        for (int i=0;i<29;i++)
-        {
-            if (m.get(i) == null)
-            {
-                assertEquals("Wrong value for "+i, expected[i], 0);
-            } else
-            {
-                assertEquals("Wrong value for "+i, expected[i], m.get(i).intValue());
+        for (int i = 0; i < 29; i++) {
+            if (m.get(i) == null) {
+                assertEquals("Wrong value for " + i, expected[i], 0);
+            } else {
+                assertEquals("Wrong value for " + i, expected[i], m.get(i).intValue());
             }
         }
     }
@@ -306,17 +290,16 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         final CountingBloomFilter bf = new CountingBloomFilter(map, shape);
 
-        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
         final BloomFilter bf2 = new CountingBloomFilter(hasher, shape);
 
         bf.remove(bf2);
         assertEquals(17, bf.cardinality());
-        final Map<Integer,Integer> map2 = new HashMap<>();
+        final Map<Integer, Integer> map2 = new HashMap<>();
         bf.getCounts().forEach(e -> map2.put(e.getKey(), e.getValue()));
 
-        for (int i = 11; i<values.length; i++)
-        {
+        for (int i = 11; i < values.length; i++) {
             assertNotNull(map2.get(i));
             assertEquals(1, map2.get(i).intValue());
         }
@@ -340,16 +323,15 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         final CountingBloomFilter bf = new CountingBloomFilter(map, shape);
 
-        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         bf.remove(hasher);
         assertEquals(17, bf.cardinality());
-        final Map<Integer,Integer> map2 = new HashMap<>();
+        final Map<Integer, Integer> map2 = new HashMap<>();
         bf.getCounts().forEach(e -> map2.put(e.getKey(), e.getValue()));
 
-        for (int i = 11; i<values.length; i++)
-        {
+        for (int i = 11; i < values.length; i++) {
             assertNotNull(map2.get(i));
             assertEquals(1, map2.get(i).intValue());
         }
@@ -373,17 +355,16 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
         final CountingBloomFilter bf = new CountingBloomFilter(map, shape);
 
-        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
         final BitSetBloomFilter bf2 = new BitSetBloomFilter(hasher, shape);
 
         bf.remove(bf2);
         assertEquals(17, bf.cardinality());
-        final Map<Integer,Integer> map2 = new HashMap<>();
+        final Map<Integer, Integer> map2 = new HashMap<>();
         bf.getCounts().forEach(e -> map2.put(e.getKey(), e.getValue()));
 
-        for (int i = 11; i<values.length; i++)
-        {
+        for (int i = 11; i < values.length; i++) {
             assertNotNull(map2.get(i));
             assertEquals(1, map2.get(i).intValue());
         }
@@ -394,13 +375,12 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
      */
     @Test
     public void removeTest_Underflow() {
-
-        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         CountingBloomFilter bf = createFilter(hasher, shape);
 
-        final Map<Integer,Integer> map = new HashMap<>();
+        final Map<Integer, Integer> map = new HashMap<>();
         bf.getCounts().forEach(e -> map.put(e.getKey(), e.getValue()));
         map.remove(1);
 
@@ -416,9 +396,7 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         try {
             bf.remove(bf2);
             fail("Should have thrown IllegalStateException");
-        }
-        catch (final IllegalStateException expected)
-        {
+        } catch (final IllegalStateException expected) {
             // do nothing
         }
     }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
index 183bc02..0ab7e70 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
@@ -35,11 +35,11 @@ import org.junit.Test;
  */
 public class CommonComparatorTest {
 
-    private void assertAfter(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
+    private static void assertAfter(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
         assertTrue(0 < HashFunctionIdentity.COMMON_COMPARATOR.compare(identity1, identity2));
     }
 
-    private void assertBefore(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
+    private static void assertBefore(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
         assertTrue(0 > HashFunctionIdentity.COMMON_COMPARATOR.compare(identity1, identity2));
     }
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
index b456930..934dacf 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
@@ -35,11 +35,11 @@ import org.junit.Test;
  */
 public class DeepComparatorTest {
 
-    private void assertAfter(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
+    private static void assertAfter(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
         assertTrue(0 < HashFunctionIdentity.DEEP_COMPARATOR.compare(identity1, identity2));
     }
 
-    private void assertBefore(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
+    private static void assertBefore(final HashFunctionIdentity identity1, final HashFunctionIdentity identity2) {
         assertTrue(0 > HashFunctionIdentity.DEEP_COMPARATOR.compare(identity1, identity2));
     }
 


[commons-collections] 10/12: Remove unthrown exception.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 1f17189d535898d12e045604692eb0f0eefae86b
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:34:56 2020 +0000

    Remove unthrown exception.
---
 .../commons/collections4/bloomfilter/HasherBloomFilterTest.java      | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
index c0c4902..1cba7b6 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
@@ -19,7 +19,6 @@ package org.apache.commons.collections4.bloomfilter;
 
 import static org.junit.Assert.assertEquals;
 
-import java.security.NoSuchAlgorithmException;
 import org.apache.commons.collections4.bloomfilter.hasher.DynamicHasher;
 import org.apache.commons.collections4.bloomfilter.hasher.Hasher;
 import org.apache.commons.collections4.bloomfilter.hasher.Shape;
@@ -34,11 +33,9 @@ public class HasherBloomFilterTest extends AbstractBloomFilterTest {
 
     /**
      * Tests that the constructor works correctly.
-     * 
-     * @throws NoSuchAlgorithmException
      */
     @Test
-    public void constructorTest_NonStatic() throws NoSuchAlgorithmException {
+    public void constructorTest_NonStatic() {
         final Shape shape = new Shape(new MD5Cyclic(), 3, 72, 17);
         final DynamicHasher hasher = new DynamicHasher.Builder(new MD5Cyclic()).with("Hello").build();
         final HasherBloomFilter filter = createFilter(hasher, shape);


[commons-collections] 04/12: Added orCardinality to BitSetBloomFilter.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 82273e966e17f1d6df1651c7ff964a898d1859ef
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:06:52 2020 +0000

    Added orCardinality to BitSetBloomFilter.
---
 .../commons/collections4/bloomfilter/BitSetBloomFilter.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
index e3adbaa..eb1aff4 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilter.java
@@ -114,6 +114,17 @@ public class BitSetBloomFilter extends AbstractBloomFilter {
     }
 
     @Override
+    public int orCardinality(final BloomFilter other) {
+        if (other instanceof BitSetBloomFilter) {
+            verifyShape(other);
+            final BitSet result = (BitSet) bitSet.clone();
+            result.or(((BitSetBloomFilter)other).bitSet);
+            return result.cardinality();
+        }
+        return super.orCardinality(other);
+    }
+
+    @Override
     public String toString() {
         return bitSet.toString();
     }


[commons-collections] 11/12: Correct test javadoc headers.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 7aaf396c836e4aca4f252053c9540214da376a60
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:44:14 2020 +0000

    Correct test javadoc headers.
---
 .../commons/collections4/bloomfilter/AbstractBloomFilterTest.java | 3 +--
 .../commons/collections4/bloomfilter/BitSetBloomFilterTest.java   | 3 +--
 .../commons/collections4/bloomfilter/CountingBloomFilterTest.java | 3 +--
 .../collections4/bloomfilter/DefaultBloomFilterMethodsTest.java   | 3 +--
 .../commons/collections4/bloomfilter/HasherBloomFilterTest.java   | 3 +--
 .../commons/collections4/bloomfilter/SetOperationsTest.java       | 3 +--
 .../collections4/bloomfilter/hasher/CommonComparatorTest.java     | 3 +--
 .../collections4/bloomfilter/hasher/DeepComparatorTest.java       | 3 +--
 .../collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java | 3 +--
 .../collections4/bloomfilter/hasher/DynamicHasherTest.java        | 3 +--
 .../bloomfilter/hasher/HashFunctionIdentityImplTest.java          | 3 +--
 .../apache/commons/collections4/bloomfilter/hasher/ShapeTest.java | 8 +-------
 .../commons/collections4/bloomfilter/hasher/StaticHasherTest.java | 2 +-
 .../collections4/bloomfilter/hasher/function/MD5CyclicTest.java   | 1 -
 .../bloomfilter/hasher/function/Murmur128x86CyclicTest.java       | 1 -
 .../bloomfilter/hasher/function/Murmur32x86IterativeTest.java     | 1 -
 .../bloomfilter/hasher/function/ObjectsHashIterativeTest.java     | 3 +--
 17 files changed, 14 insertions(+), 35 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
index a338899..0230c30 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractBloomFilterTest.java
@@ -33,8 +33,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;
 import org.junit.Test;
 
 /**
- * Test standard methods.
- *
+ * Test standard methods in the {@link BloomFilter} interface.
  */
 public abstract class AbstractBloomFilterTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
index 9fc4995..e7edf0f 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/BitSetBloomFilterTest.java
@@ -27,8 +27,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;
 import org.junit.Test;
 
 /**
- * Tests for the BitSetBloomFilter implementation.
- *
+ * Tests for the {@link BitSetBloomFilter}.
  */
 public class BitSetBloomFilterTest extends AbstractBloomFilterTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
index f6e95dc..55661dc 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
@@ -32,8 +32,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;
 import org.junit.Test;
 
 /**
- * Tests for the Counting Bloom filter implementation.
- *
+ * Tests for the {@link CountingBloomFilter}.
  */
 public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
index c1f248d..bd4ce0f 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterMethodsTest.java
@@ -25,8 +25,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.Shape;
 import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;
 
 /**
- * A test that test all the default implementations on the BloomFilter.
- *
+ * Test all the default implementations of the BloomFilter in {@link AbstractBloomFilter}.
  */
 public class DefaultBloomFilterMethodsTest extends AbstractBloomFilterTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
index 1cba7b6..50cd58d 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/HasherBloomFilterTest.java
@@ -26,8 +26,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.function.MD5Cyclic;
 import org.junit.Test;
 
 /**
- * Tests the HasherBloomFilter implementation.
- *
+ * Tests the {@link HasherBloomFilter}.
  */
 public class HasherBloomFilterTest extends AbstractBloomFilterTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
index 233ec42..d492800 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
@@ -27,8 +27,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.StaticHasher;
 import org.junit.Test;
 
 /**
- * Test SetOperations implementation
- *
+ * Test {@link SetOperations}.
  */
 public class SetOperationsTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
index 0ab7e70..da0f1f6 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/CommonComparatorTest.java
@@ -30,8 +30,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity.S
 import org.junit.Test;
 
 /**
- * Tests of the HashFunctionIdentity.COMMON_COMPARATOR
- *
+ * Tests of the {@link HashFunctionIdentity#COMMON_COMPARATOR}.
  */
 public class CommonComparatorTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
index 934dacf..c4f8d46 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DeepComparatorTest.java
@@ -30,8 +30,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity.S
 import org.junit.Test;
 
 /**
- * Tests of the HashFunctionIdentity.DEEP_COMPARATOR
- *
+ * Tests of the {@link HashFunctionIdentity#DEEP_COMPARATOR}.
  */
 public class DeepComparatorTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
index 33b044c..b271cd9 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
@@ -28,8 +28,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 /**
- * DynamicHasher Builder tests.
- *
+ * {@link DynamicHasher.Builder} tests.
  */
 public class DynamicHasherBuilderTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
index 0c77970..3babbb7 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
@@ -29,8 +29,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 /**
- * Tests the Dynamic Hasher
- *
+ * Tests the {@link DynamicHasher}.
  */
 public class DynamicHasherTest {
     private DynamicHasher.Builder builder;
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
index 01f68e0..ab37616 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImplTest.java
@@ -24,8 +24,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity.P
 import org.junit.Test;
 
 /**
- * Tests the HashFunctionIdentity implementation.
- *
+ * Tests the HashFunctionIdentity implementation ({@link HashFunctionIdentityImpl})..
  */
 public class HashFunctionIdentityImplTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
index 899cb65..78ba037 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/ShapeTest.java
@@ -28,8 +28,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.Shape;
 import org.junit.Test;
 
 /**
- * Tests that the Shap class.
- *
+ * Tests the {@link Shape} class.
  */
 public class ShapeTest {
 
@@ -225,7 +224,6 @@ public class ShapeTest {
         } catch (final IllegalArgumentException expected) {
             // do nothing.
         }
-
         try {
             new Shape(testFunction, 10, 1.0);
             fail("Should have thrown IllegalArgumentException");
@@ -265,7 +263,6 @@ public class ShapeTest {
      */
     @Test
     public void constructor_nm_noName() {
-
         try {
             new Shape(null, 5, 72);
             fail("Should throw NullPointerException");
@@ -279,7 +276,6 @@ public class ShapeTest {
      */
     @Test
     public void constructor_nmk_noName() {
-
         try {
             new Shape(null, 5, 72, 17);
             fail("Should throw NullPointerException");
@@ -293,7 +289,6 @@ public class ShapeTest {
      */
     @Test
     public void constructor_np_noName() {
-
         try {
             new Shape(null, 5, 0.1);
             fail("Should throw NullPointerException");
@@ -307,7 +302,6 @@ public class ShapeTest {
      */
     @Test
     public void constructor_pmk_noName() {
-
         try {
             new Shape(null, 0.1, 72, 17);
             fail("Should throw NullPointerException");
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
index 30daaa9..dc9ce4f 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
@@ -31,7 +31,7 @@ import java.util.PrimitiveIterator.OfInt;
 import org.junit.Test;
 
 /**
- * Tests the static hasher.
+ * Tests the {@link StaticHasher}.
  */
 public class StaticHasherTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
index 428c02a..d82ea8a 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/MD5CyclicTest.java
@@ -27,7 +27,6 @@ import org.junit.Test;
 
 /**
  * Tests the MD5 cyclic hash function.
- *
  */
 public class MD5CyclicTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
index 6dd9730..35fc1c7 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86CyclicTest.java
@@ -27,7 +27,6 @@ import org.junit.Test;
 
 /**
  * Test that the Murmur3 128 x86 hash function works correctly.
- *
  */
 public class Murmur128x86CyclicTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
index 96ad132..efe6da2 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86IterativeTest.java
@@ -27,7 +27,6 @@ import org.junit.Test;
 
 /**
  * Test that the Murmur3 32 x86 hash function works correctly.
- *
  */
 public class Murmur32x86IterativeTest {
 
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
index 17ebb11..4df7f75 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/function/ObjectsHashIterativeTest.java
@@ -26,8 +26,7 @@ import org.apache.commons.collections4.bloomfilter.hasher.function.ObjectsHashIt
 import org.junit.Test;
 
 /**
- * Tests that the Objects hash works correctly..
- *
+ * Tests that the Objects hash works correctly.
  */
 public class ObjectsHashIterativeTest {
 


[commons-collections] 07/12: Remove unthrown exception from test setup().

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit fa028268a8b637706c887c794868e6e191edd667
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:25:47 2020 +0000

    Remove unthrown exception from test setup().
---
 .../collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java    | 5 +----
 .../commons/collections4/bloomfilter/hasher/DynamicHasherTest.java   | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
index a63e911..33b044c 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java
@@ -21,7 +21,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import java.security.NoSuchAlgorithmException;
 import java.util.PrimitiveIterator.OfInt;
 
 import org.apache.commons.collections4.bloomfilter.hasher.function.MD5Cyclic;
@@ -97,11 +96,9 @@ public class DynamicHasherBuilderTest {
 
     /**
      * Sets up the builder for testing.
-     * 
-     * @throws NoSuchAlgorithmException if MD5 is not available.
      */
     @Before
-    public void setup() throws NoSuchAlgorithmException {
+    public void setup() {
         builder = new DynamicHasher.Builder(new MD5Cyclic());
     }
 }
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
index fa4efa5..0c77970 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherTest.java
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.security.NoSuchAlgorithmException;
 import java.util.PrimitiveIterator.OfInt;
 
 import org.apache.commons.collections4.bloomfilter.hasher.function.MD5Cyclic;
@@ -67,11 +66,9 @@ public class DynamicHasherTest {
 
     /**
      * Sets up the DynamicHasher.
-     *
-     * @throws NoSuchAlgorithmException is MD5 is not available.
      */
     @Before
-    public void setup() throws NoSuchAlgorithmException {
+    public void setup() {
         builder = new DynamicHasher.Builder(new MD5Cyclic());
         shape = new Shape(new MD5Cyclic(), 3, 72, 17);
     }


[commons-collections] 12/12: Javadoc clean-up.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit d31ebdd0e4a7da2d8eb6c7ba54d317af5ab872d2
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 14:10:10 2020 +0000

    Javadoc clean-up.
---
 .../bloomfilter/hasher/HashFunctionIdentity.java   | 42 +++++++++++++++-------
 .../collections4/bloomfilter/hasher/Hasher.java    |  3 +-
 2 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
index 3b14b84..cf518b4 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
@@ -22,26 +22,42 @@ import java.util.Comparator;
 import java.util.Locale;
 
 /**
- * Defines the a Hash Function used by Hashers.
+ * Defines the hash function used by a {@link Hasher}.
  *
  * @since 4.5
  */
 public interface HashFunctionIdentity {
 
     /**
-     * An enum that identifies the process type of this function. <dl> <dt>Iterative
-     * processes</dt> <dd>Call the underlying algorithm for each buffer, seed pair call to
-     * {@code apply}.</dd> <dt>Cyclic processes</dt> <dd>Call the underlying algorithm to
-     * generate two values for each buffer. It returns the first value on the call with
-     * seed 0, and increments the result with the second value before returning it on all
-     * subsequent calls.</dd> </dl>
+     * Identifies the process type of this function.
+     *
+     * <dl>
+     *  <dt>Iterative processes</dt>
+     *  <dd>Call the underlying hash algorithm for each (buffer, seed) pair passed to
+     *  {@link HashFunction#apply(byte[], int)}.</dd>
+     *  <dt>Cyclic processes</dt>
+     *  <dd>Call the underlying hash algorithm using a (buffer, seed) pair passed to
+     *  {@link HashFunction#apply(byte[], int)} to initialise the state. Subsequent
+     *  calls can generate hash values without calling the underlying algorithm.</dd>
+     * </dl>
      */
     enum ProcessType {
-        CYCLIC, ITERATIVE
+        /**
+         * Call the underlying hash algorithm for a (buffer, seed) pair passed to
+         * {@link HashFunction#apply(byte[], int)} when the state is uninitialised or
+         * the seed is zero. This initialises the state. Subsequent calls with a non-zero
+         * seed use the state to generate a new value.</dd>
+         */
+        CYCLIC,
+        /**
+         * Call the underlying hash algorithm for each (buffer, seed) pair passed to
+         * {@link HashFunction#apply(byte[], int)}.
+         */
+        ITERATIVE
     }
 
     /**
-     * An enum that identifies the Signedness of the calculations for this function.
+     * Identifies the signedness of the calculations for this function.
      */
     enum Signedness {
         SIGNED, UNSIGNED
@@ -66,8 +82,8 @@ public interface HashFunctionIdentity {
     };
 
     /**
-     * A comparator implementation that performs the most common comparison using the
-     * HashFunctionIdentity name, signedness, process, and privider..
+     * A comparator implementation that performs the comparison using all the properties of the
+     * HashFunctionIdentity: name, signedness, process, and provider.
      */
     Comparator<HashFunctionIdentity> DEEP_COMPARATOR = new Comparator<HashFunctionIdentity>() {
         @Override
@@ -121,9 +137,9 @@ public interface HashFunctionIdentity {
     String getName();
 
     /**
-     * Gets the process of this function.
+     * Gets the process type of this function.
      *
-     * @return process of this function.
+     * @return process type of this function.
      */
     ProcessType getProcessType();
 
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
index 523438c..2596396 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Hasher.java
@@ -23,7 +23,8 @@ import java.util.PrimitiveIterator;
  * The class that performs hashing.
  * <p>
  * Hashers have a Unique name based on the hashing algorithm used.
- * </p><p>
+ * </p>
+ * <p>
  * Implementations of {@code getBits()} may return duplicate values and may return
  * values in a random order.  See implementation javadoc notes as to the guarantees
  * provided by the specific implementation.


[commons-collections] 05/12: Remove whitespace around parentheses.

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 5f7094857020a308ae494422eecb026e8a5252da
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 13:17:11 2020 +0000

    Remove whitespace around parentheses.
---
 .../bloomfilter/CountingBloomFilter.java           |  18 +--
 .../bloomfilter/hasher/HashFunctionIdentity.java   |   2 +-
 .../hasher/HashFunctionIdentityImpl.java           |   4 +-
 .../collections4/bloomfilter/hasher/Shape.java     |   2 +-
 .../bloomfilter/CountingBloomFilterTest.java       | 158 ++++++++++-----------
 .../bloomfilter/SetOperationsTest.java             |   8 +-
 .../bloomfilter/hasher/StaticHasherTest.java       |   6 +-
 7 files changed, 99 insertions(+), 99 deletions(-)

diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
index ed872e2..b1437cb 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
@@ -102,8 +102,8 @@ public class CountingBloomFilter extends AbstractBloomFilter {
     @Override
     public int andCardinality(final BloomFilter other) {
         if (other instanceof CountingBloomFilter) {
-            final Set<Integer> result = new HashSet<>( counts.keySet());
-            result.retainAll( ((CountingBloomFilter)other).counts.keySet() );
+            final Set<Integer> result = new HashSet<>(counts.keySet());
+            result.retainAll(((CountingBloomFilter)other).counts.keySet());
             return result.size();
         }
         return super.andCardinality(other);
@@ -172,8 +172,8 @@ public class CountingBloomFilter extends AbstractBloomFilter {
 
     @Override
     public void merge(final Hasher hasher) {
-        verifyHasher( hasher );
-        merge( hasher.getBits(getShape()) );
+        verifyHasher(hasher);
+        merge(hasher.getBits(getShape()));
     }
 
     /**
@@ -186,9 +186,9 @@ public class CountingBloomFilter extends AbstractBloomFilter {
             if (val == null) {
                 counts.put(idx, 1 );
             } else if (val == Integer.MAX_VALUE) {
-                throw new IllegalStateException( "Overflow on index "+idx);
+                throw new IllegalStateException("Overflow on index " + idx);
             } else {
-                counts.put( idx,  val+1 );
+                counts.put(idx, val + 1);
             }
         });
     }
@@ -223,9 +223,9 @@ public class CountingBloomFilter extends AbstractBloomFilter {
      * @param hasher the hasher to generate bits.
      */
     public void remove(final Hasher hasher) {
-        verifyHasher( hasher );
+        verifyHasher(hasher);
         final Set<Integer> lst = new HashSet<>();
-        hasher.getBits(getShape()).forEachRemaining( (Consumer<Integer>)lst::add );
+        hasher.getBits(getShape()).forEachRemaining((Consumer<Integer>)lst::add);
         remove(lst.stream());
     }
 
@@ -245,7 +245,7 @@ public class CountingBloomFilter extends AbstractBloomFilter {
                 }
             }
             if (val == null || val == 0) {
-                throw new IllegalStateException( "Underflow on index "+idx);
+                throw new IllegalStateException("Underflow on index " + idx);
             } else if (val - 1 == 0) {
                 counts.remove(idx);
             } else {
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
index 65383e1..00170e0 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentity.java
@@ -106,7 +106,7 @@ public interface HashFunctionIdentity {
      */
     static byte[] prepareSignatureBuffer(final HashFunctionIdentity identity) {
 
-       return String.format( "%s-%s-%s",
+       return String.format("%s-%s-%s",
            identity.getName().toUpperCase(Locale.ROOT), identity.getSignedness(),
            identity.getProcessType() ).getBytes(StandardCharsets.UTF_8);
 
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
index a0a047b..5a55f1b 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionIdentityImpl.java
@@ -35,7 +35,7 @@ public final class HashFunctionIdentityImpl implements HashFunctionIdentity {
      * Creates a copy of the HashFunctionIdentity.
      * @param identity the identity to copy.
      */
-    public HashFunctionIdentityImpl( final HashFunctionIdentity identity) {
+    public HashFunctionIdentityImpl(final HashFunctionIdentity identity) {
         this.name = identity.getName();
         this.provider = identity.getProvider();
         this.signedness = identity.getSignedness();
@@ -51,7 +51,7 @@ public final class HashFunctionIdentityImpl implements HashFunctionIdentity {
      * @param process the processes of the hash function.
      * @param signature the signature for the hash function.
      */
-    public HashFunctionIdentityImpl( final String provider, final String name, final Signedness signedness, final ProcessType process,
+    public HashFunctionIdentityImpl(final String provider, final String name, final Signedness signedness, final ProcessType process,
         final long signature) {
         this.name = name;
         this.provider = provider;
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
index f5a1e45..b3ac6ed 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/Shape.java
@@ -261,7 +261,7 @@ public class Shape {
             return
                 other.getNumberOfBits() == getNumberOfBits() &&
                 other.getNumberOfHashFunctions() == getNumberOfHashFunctions() &&
-                HashFunctionIdentity.COMMON_COMPARATOR.compare( getHashFunctionIdentity(),
+                HashFunctionIdentity.COMMON_COMPARATOR.compare(getHashFunctionIdentity(),
                     other.getHashFunctionIdentity()) == 0;
         }
         return false;
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
index 991ef01..c59dd9b 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilterTest.java
@@ -44,26 +44,26 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
      */
     @Test
     public void andCardinalityTest_CountingBloomFilter() {
-        final Hasher hasher = new StaticHasher( Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ).iterator(), shape );
+        final Hasher hasher = new StaticHasher(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).iterator(), shape);
 
         final CountingBloomFilter bf = createFilter(hasher, shape);
 
-        Hasher hasher2 = new StaticHasher( Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ).iterator(), shape );
+        Hasher hasher2 = new StaticHasher(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).iterator(), shape);
         CountingBloomFilter bf2 = createFilter(hasher2, shape);
 
-        assertEquals( 10, bf.andCardinality(bf2));
-        assertEquals( 10, bf2.andCardinality(bf));
+        assertEquals(10, bf.andCardinality(bf2));
+        assertEquals(10, bf2.andCardinality(bf));
 
-        hasher2 = new StaticHasher( Arrays.asList( 1, 2, 3, 4, 5 ).iterator(), shape );
+        hasher2 = new StaticHasher(Arrays.asList(1, 2, 3, 4, 5).iterator(), shape);
         bf2 = createFilter(hasher2, shape);
 
-        assertEquals( 5, bf.andCardinality(bf2));
-        assertEquals( 5, bf2.andCardinality(bf));
+        assertEquals(5, bf.andCardinality(bf2));
+        assertEquals(5, bf2.andCardinality(bf));
 
-        hasher2 = new StaticHasher( Arrays.asList( 11, 12, 13, 14, 15 ).iterator(), shape );
+        hasher2 = new StaticHasher(Arrays.asList(11, 12, 13, 14, 15).iterator(), shape);
         bf2 = createFilter(hasher2, shape);
-        assertEquals( 0, bf.andCardinality(bf2));
-        assertEquals( 0, bf2.andCardinality(bf));
+        assertEquals(0, bf.andCardinality(bf2));
+        assertEquals(0, bf2.andCardinality(bf));
 
 
     }
@@ -73,8 +73,8 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
      */
     @Test
     public void ConstructorTest_HasherValues_CountsTest() {
-        final List<Integer> lst = Arrays.asList( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
+        final List<Integer> lst = Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         final CountingBloomFilter bf = createFilter(hasher, shape);
         final long[] lb = bf.getBits();
@@ -95,15 +95,15 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         final Map<Integer,Integer> map = new HashMap<>();
         for (int i =0;i<17;i++)
         {
-            map.put( i, 1 );
+            map.put(i, 1);
         }
 
-        CountingBloomFilter bf = new CountingBloomFilter( map, shape);
+        CountingBloomFilter bf = new CountingBloomFilter(map, shape);
         assertEquals(17, bf.getCounts().count());
 
-        map.put( shape.getNumberOfBits(), 1 );
+        map.put(shape.getNumberOfBits(), 1);
         try {
-            bf = new CountingBloomFilter( map, shape);
+            bf = new CountingBloomFilter(map, shape);
             fail("Should have thrown IllegalArgumentExceptionW");
         } catch (final IllegalArgumentException exprected)
         {
@@ -111,9 +111,9 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         }
 
         map.clear();
-        map.put( -1, 1 );
+        map.put(-1, 1);
         try {
-            bf = new CountingBloomFilter( map, shape);
+            bf = new CountingBloomFilter(map, shape);
             fail("Should have thrown IllegalArgumentExceptionW");
         } catch (final IllegalArgumentException exprected)
         {
@@ -121,9 +121,9 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         }
 
         map.clear();
-        map.put( 1, -1 );
+        map.put(1, -1);
         try {
-            bf = new CountingBloomFilter( map, shape);
+            bf = new CountingBloomFilter(map, shape);
             fail("Should have thrown IllegalArgumentExceptionW");
         } catch (final IllegalArgumentException exprected)
         {
@@ -134,12 +134,12 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
 
     @Override
     protected CountingBloomFilter createEmptyFilter(final Shape shape) {
-        return new CountingBloomFilter( shape );
+        return new CountingBloomFilter(shape);
     }
 
     @Override
     protected CountingBloomFilter createFilter(final Hasher hasher, final Shape shape) {
-        return new CountingBloomFilter( hasher, shape );
+        return new CountingBloomFilter(hasher, shape);
     }
 
 
@@ -153,13 +153,13 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
             1, 2, 2, 2, 2, 2, 2, 2, 1, 1,
             1, 1, 1, 1, 1, 1, 1, 1, 0
         };
-        final List<Integer> lst = Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         final CountingBloomFilter bf = createFilter(hasher, shape);
 
-        final List<Integer> lst2 = Arrays.asList( 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27 );
-        final Hasher hasher2 = new StaticHasher( lst2.iterator(), shape );
+        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27);
+        final Hasher hasher2 = new StaticHasher(lst2.iterator(), shape);
         final BloomFilter bf2 = createFilter(hasher2, shape);
 
         bf.merge(bf2);
@@ -174,10 +174,10 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         {
             if (m.get(i) == null)
             {
-                assertEquals( "Wrong value for "+i, expected[i], 0 );
+                assertEquals("Wrong value for "+i, expected[i], 0);
             } else
             {
-                assertEquals( "Wrong value for "+i, expected[i], m.get(i).intValue());
+                assertEquals("Wrong value for "+i, expected[i], m.get(i).intValue());
             }
         }
     }
@@ -192,13 +192,13 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
             1, 2, 2, 2, 2, 2, 2, 2, 1, 1,
             1, 1, 1, 1, 1, 1, 1, 1, 0
         };
-        final List<Integer> lst = Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         final CountingBloomFilter bf = createFilter(hasher, shape);
 
-        final List<Integer> lst2 = Arrays.asList( 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27 );
-        final Hasher hasher2 = new StaticHasher( lst2.iterator(), shape );
+        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27);
+        final Hasher hasher2 = new StaticHasher(lst2.iterator(), shape);
         final BloomFilter bf2 = new BitSetBloomFilter(hasher2, shape);
 
         bf.merge(bf2);
@@ -213,10 +213,10 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         {
             if (m.get(i) == null)
             {
-                assertEquals( "Wrong value for "+i, expected[i], 0 );
+                assertEquals("Wrong value for "+i, expected[i], 0);
             } else
             {
-                assertEquals( "Wrong value for "+i, expected[i], m.get(i).intValue());
+                assertEquals("Wrong value for "+i, expected[i], m.get(i).intValue());
             }
         }
 
@@ -228,15 +228,15 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
     @Test
     public void mergeTest_Overflow() {
 
-        final List<Integer> lst = Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         CountingBloomFilter bf = createFilter(hasher, shape);
 
 
         final Map<Integer,Integer> map = new HashMap<>();
-        bf.getCounts().forEach( e -> map.put( e.getKey(), e.getValue()));
-        map.put(1, Integer.MAX_VALUE );
+        bf.getCounts().forEach(e -> map.put(e.getKey(), e.getValue()));
+        map.put(1, Integer.MAX_VALUE);
 
         CountingBloomFilter bf2 = new CountingBloomFilter(map, shape);
 
@@ -268,13 +268,13 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
             1, 1, 1, 1, 1, 1, 1, 1, 0
         };
 
-        final List<Integer> lst = Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         final CountingBloomFilter bf = createFilter(hasher, shape);
 
-        final List<Integer> lst2 = Arrays.asList( 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27 );
-        final Hasher hasher2 = new StaticHasher( lst2.iterator(), shape );
+        final List<Integer> lst2 = Arrays.asList(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ,26 ,27);
+        final Hasher hasher2 = new StaticHasher(lst2.iterator(), shape);
 
         bf.merge(hasher2);
 
@@ -288,10 +288,10 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         {
             if (m.get(i) == null)
             {
-                assertEquals( "Wrong value for "+i, expected[i], 0 );
+                assertEquals("Wrong value for "+i, expected[i], 0);
             } else
             {
-                assertEquals( "Wrong value for "+i, expected[i], m.get(i).intValue());
+                assertEquals("Wrong value for "+i, expected[i], m.get(i).intValue());
             }
         }
     }
@@ -309,24 +309,24 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         final Map<Integer,Integer> map = new HashMap<>();
         for (int i=1;i<values.length;i++)
         {
-            map.put( i, values[i] );
+            map.put(i, values[i]);
         }
 
-        final CountingBloomFilter bf = new CountingBloomFilter( map, shape );
+        final CountingBloomFilter bf = new CountingBloomFilter(map, shape);
 
-        final List<Integer> lst = Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
-        final BloomFilter bf2 = new CountingBloomFilter( hasher, shape );
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
+        final BloomFilter bf2 = new CountingBloomFilter(hasher, shape);
 
-        bf.remove( bf2 );
-        assertEquals( 17, bf.cardinality() );
+        bf.remove(bf2);
+        assertEquals(17, bf.cardinality());
         final Map<Integer,Integer> map2 = new HashMap<>();
-        bf.getCounts().forEach( e -> map2.put( e.getKey(), e.getValue()));
+        bf.getCounts().forEach(e -> map2.put(e.getKey(), e.getValue()));
 
-        for (int i = 11; i<values.length; i++ )
+        for (int i = 11; i<values.length; i++)
         {
-            assertNotNull( map2.get(i) );
-            assertEquals( 1, map2.get(i).intValue());
+            assertNotNull(map2.get(i));
+            assertEquals(1, map2.get(i).intValue());
         }
 
     }
@@ -344,24 +344,24 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         final Map<Integer,Integer> map = new HashMap<>();
         for (int i=1;i<values.length;i++)
         {
-            map.put( i, values[i] );
+            map.put(i, values[i]);
         }
 
-        final CountingBloomFilter bf = new CountingBloomFilter( map, shape );
+        final CountingBloomFilter bf = new CountingBloomFilter(map, shape);
 
-        final List<Integer> lst = Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
 
-        bf.remove( hasher );
-        assertEquals( 17, bf.cardinality() );
+        bf.remove(hasher);
+        assertEquals(17, bf.cardinality());
         final Map<Integer,Integer> map2 = new HashMap<>();
-        bf.getCounts().forEach( e -> map2.put( e.getKey(), e.getValue()));
+        bf.getCounts().forEach(e -> map2.put(e.getKey(), e.getValue()));
 
-        for (int i = 11; i<values.length; i++ )
+        for (int i = 11; i<values.length; i++)
         {
-            assertNotNull( map2.get(i) );
-            assertEquals( 1, map2.get(i).intValue());
+            assertNotNull(map2.get(i));
+            assertEquals(1, map2.get(i).intValue());
         }
 
     }
@@ -379,24 +379,24 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
         final Map<Integer,Integer> map = new HashMap<>();
         for (int i=1;i<values.length;i++)
         {
-            map.put( i, values[i] );
+            map.put(i, values[i]);
         }
 
-        final CountingBloomFilter bf = new CountingBloomFilter( map, shape );
+        final CountingBloomFilter bf = new CountingBloomFilter(map, shape);
 
-        final List<Integer> lst = Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
-        final BitSetBloomFilter bf2 = new BitSetBloomFilter( hasher, shape );
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
+        final BitSetBloomFilter bf2 = new BitSetBloomFilter(hasher, shape);
 
-        bf.remove( bf2 );
-        assertEquals( 17, bf.cardinality() );
+        bf.remove(bf2);
+        assertEquals(17, bf.cardinality());
         final Map<Integer,Integer> map2 = new HashMap<>();
-        bf.getCounts().forEach( e -> map2.put( e.getKey(), e.getValue()));
+        bf.getCounts().forEach(e -> map2.put(e.getKey(), e.getValue()));
 
-        for (int i = 11; i<values.length; i++ )
+        for (int i = 11; i<values.length; i++)
         {
-            assertNotNull( map2.get(i) );
-            assertEquals( 1, map2.get(i).intValue());
+            assertNotNull(map2.get(i));
+            assertEquals(1, map2.get(i).intValue());
         }
 
     }
@@ -407,14 +407,14 @@ public class CountingBloomFilterTest extends AbstractBloomFilterTest {
     @Test
     public void removeTest_Underflow() {
 
-        final List<Integer> lst = Arrays.asList( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17 );
-        final Hasher hasher = new StaticHasher( lst.iterator(), shape );
+        final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ,16 ,17);
+        final Hasher hasher = new StaticHasher(lst.iterator(), shape);
 
         CountingBloomFilter bf = createFilter(hasher, shape);
 
 
         final Map<Integer,Integer> map = new HashMap<>();
-        bf.getCounts().forEach( e -> map.put( e.getKey(), e.getValue()));
+        bf.getCounts().forEach(e -> map.put(e.getKey(), e.getValue()));
         map.remove(1);
 
         CountingBloomFilter bf2 = new CountingBloomFilter(map, shape);
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
index 27d04f4..a8fc4eb 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/SetOperationsTest.java
@@ -109,7 +109,7 @@ public class SetOperationsTest {
         // build a filter
         final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
-        final BloomFilter filter3 = new HasherBloomFilter( hasher, shape );
+        final BloomFilter filter3 = new HasherBloomFilter(hasher, shape);
 
         assertEquals(1.0, SetOperations.cosineDistance(filter1, filter2), 0.0001);
         assertEquals(1.0, SetOperations.cosineDistance(filter2, filter1), 0.0001);
@@ -154,7 +154,7 @@ public class SetOperationsTest {
         // build a filter
         final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
-        final BloomFilter filter3 = new HasherBloomFilter( hasher, shape );
+        final BloomFilter filter3 = new HasherBloomFilter(hasher, shape);
 
         assertEquals(0.0, SetOperations.cosineSimilarity(filter1, filter2), 0.0001);
         assertEquals(0.0, SetOperations.cosineSimilarity(filter2, filter1), 0.0001);
@@ -293,7 +293,7 @@ public class SetOperationsTest {
         // build a filter
         final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
-        final BloomFilter filter3 = new HasherBloomFilter( hasher, shape );
+        final BloomFilter filter3 = new HasherBloomFilter(hasher, shape);
 
         assertEquals(1.0, SetOperations.jaccardDistance(filter1, filter2), 0.0001);
         assertEquals(1.0, SetOperations.jaccardDistance(filter2, filter1), 0.0001);
@@ -337,7 +337,7 @@ public class SetOperationsTest {
         // build a filter
         final List<Integer> lst = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17);
         final Hasher hasher = new StaticHasher(lst.iterator(), shape);
-        final BloomFilter filter3 = new HasherBloomFilter( hasher, shape );
+        final BloomFilter filter3 = new HasherBloomFilter(hasher, shape);
 
         assertEquals(0.0, SetOperations.jaccardSimilarity(filter1, filter2), 0.0001);
         assertEquals(0.0, SetOperations.jaccardSimilarity(filter2, filter1), 0.0001);
diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
index cb3924d..f622171 100644
--- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
+++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/StaticHasherTest.java
@@ -329,10 +329,10 @@ public class StaticHasherTest {
         StaticHasher hasher = new StaticHasher(lst.iterator(), shape);
 
 
-        assertTrue( hasher.isEmpty() );
+        assertTrue(hasher.isEmpty());
 
-        lst.add( Integer.valueOf( 1 ));
+        lst.add( Integer.valueOf(1));
         hasher = new StaticHasher(lst.iterator(), shape);
-        assertFalse( hasher.isEmpty() );
+        assertFalse(hasher.isEmpty());
     }
 }