This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
The following commit(s) were added to refs/heads/master by this push:
new a8a0bba75 Add and fix Checkstyle ParenPad
a8a0bba75 is described below
commit a8a0bba75e0dece3bbf97dd8a652bae428c982e7
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Oct 3 17:38:44 2024 -0400
Add and fix Checkstyle ParenPad
---
.../collections4/bloomfilter/CountingBloomFilter.java | 2 +-
.../apache/commons/collections4/iterators/ArrayIterator.java | 12 +++---------
.../commons/collections4/iterators/FilterListIterator.java | 2 +-
.../bloomfilter/AbstractCountingBloomFilterTest.java | 10 +++++-----
.../collections4/bloomfilter/DefaultCellExtractorTest.java | 2 +-
.../collections4/bloomfilter/LayeredBloomFilterTest.java | 4 ++--
.../collections4/splitmap/TransformedSplitMapTest.java | 2 +-
7 files changed, 14 insertions(+), 20 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 a9ca13325..00e8a6231 100644
---
a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
+++
b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java
@@ -147,7 +147,7 @@ public interface CountingBloomFilter extends BloomFilter,
CellExtractor {
* @see #getMaxInsert(CellExtractor)
*/
default int getMaxInsert(final IndexExtractor indexExtractor) {
- return getMaxInsert(CellExtractor.from(indexExtractor.uniqueIndices())
);
+ return
getMaxInsert(CellExtractor.from(indexExtractor.uniqueIndices()));
}
/**
diff --git
a/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java
b/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java
index c0f7bfd4d..94fc2f2ae 100644
--- a/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java
+++ b/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java
@@ -105,18 +105,12 @@ public class ArrayIterator<E> implements
ResettableIterator<E> {
* @param type the index type (for error messages)
* @throws IndexOutOfBoundsException if the index is invalid
*/
- protected void checkBound(final int bound, final int len, final String
type ) {
+ protected void checkBound(final int bound, final int len, final String
type) {
if (bound > len) {
- throw new ArrayIndexOutOfBoundsException(
- "Attempt to make an ArrayIterator that " + type +
- "s beyond the end of the array. "
- );
+ throw new ArrayIndexOutOfBoundsException("Attempt to make an
ArrayIterator that " + type + "s beyond the end of the array. ");
}
if (bound < 0) {
- throw new ArrayIndexOutOfBoundsException(
- "Attempt to make an ArrayIterator that " + type +
- "s before the start of the array. "
- );
+ throw new ArrayIndexOutOfBoundsException("Attempt to make an
ArrayIterator that " + type + "s before the start of the array. ");
}
}
diff --git
a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
index f79c46f73..34a1822ad 100644
---
a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
+++
b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java
@@ -81,7 +81,7 @@ public class FilterListIterator<E> implements ListIterator<E>
{
*
* @param iterator the iterator to use
*/
- public FilterListIterator(final ListIterator<? extends E> iterator ) {
+ public FilterListIterator(final ListIterator<? extends E> iterator) {
this.iterator = iterator;
}
diff --git
a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java
b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java
index 93a39c4d6..942fc4aa5 100644
---
a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java
+++
b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java
@@ -342,8 +342,8 @@ public abstract class AbstractCountingBloomFilterTest<T
extends CountingBloomFil
final CountingBloomFilter bf7 = createFilter(getTestShape(),
TestingHashers.FROM1);
final BitMapExtractor bmp2 = BitMapExtractor.fromIndexExtractor(ip2,
getTestShape().getNumberOfBits());
assertThrows(IllegalArgumentException.class, () -> bf7.remove(bmp2));
- assertThrows(IllegalArgumentException.class, () -> bf7.remove( new
BadHasher(-1)));
- assertThrows(IllegalArgumentException.class, () -> bf7.remove( new
BadHasher(getTestShape().getNumberOfBits())));
+ assertThrows(IllegalArgumentException.class, () -> bf7.remove(new
BadHasher(-1)));
+ assertThrows(IllegalArgumentException.class, () -> bf7.remove(new
BadHasher(getTestShape().getNumberOfBits())));
}
/**
@@ -358,7 +358,7 @@ public abstract class AbstractCountingBloomFilterTest<T
extends CountingBloomFil
final CountingBloomFilter bf2 = createFilter(getTestShape(),
TestingHashers.FROM11);
assertTrue(bf1.subtract(bf2), "Subtract should work");
- assertFalse(bf1.contains(
TestingHashers.populateFromHashersFrom1AndFrom11(new
SimpleBloomFilter(getTestShape()))), "Should not contain bitHasher");
+
assertFalse(bf1.contains(TestingHashers.populateFromHashersFrom1AndFrom11(new
SimpleBloomFilter(getTestShape()))), "Should not contain bitHasher");
assertTrue(bf1.contains(TestingHashers.FROM1), "Should contain
TestingHashers.from1");
assertCounts(bf1, from1Counts);
@@ -375,8 +375,8 @@ public abstract class AbstractCountingBloomFilterTest<T
extends CountingBloomFil
assertCounts(bf3, new int[] {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0});
- assertThrows(IllegalArgumentException.class, () -> bf3.remove( new
BadHasher(-1)));
- assertThrows(IllegalArgumentException.class, () -> bf3.remove( new
BadHasher(getTestShape().getNumberOfBits())));
+ assertThrows(IllegalArgumentException.class, () -> bf3.remove(new
BadHasher(-1)));
+ assertThrows(IllegalArgumentException.class, () -> bf3.remove(new
BadHasher(getTestShape().getNumberOfBits())));
}
private void verifyMaxInsert(final CountingBloomFilter bf, final int
from1, final int from11) {
diff --git
a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultCellExtractorTest.java
b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultCellExtractorTest.java
index 5711360ce..01717a0d1 100644
---
a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultCellExtractorTest.java
+++
b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultCellExtractorTest.java
@@ -31,7 +31,7 @@ public class DefaultCellExtractorTest extends
AbstractCellExtractorTest {
protected CellExtractor createExtractor() {
return consumer -> {
for (int i = 0; i < indices.length; i++) {
- if (!consumer.test(indices[i], values[i] )) {
+ if (!consumer.test(indices[i], values[i])) {
return false;
}
}
diff --git
a/src/test/java/org/apache/commons/collections4/bloomfilter/LayeredBloomFilterTest.java
b/src/test/java/org/apache/commons/collections4/bloomfilter/LayeredBloomFilterTest.java
index d6da94f5b..270e139d5 100644
---
a/src/test/java/org/apache/commons/collections4/bloomfilter/LayeredBloomFilterTest.java
+++
b/src/test/java/org/apache/commons/collections4/bloomfilter/LayeredBloomFilterTest.java
@@ -233,8 +233,8 @@ public class LayeredBloomFilterTest extends
AbstractBloomFilterTest<LayeredBloom
final LayerManager layerManager = LayerManager.builder()
.setSupplier(() -> new NumberedBloomFilter(getTestShape(), 3,
sequence[0]++))
.setExtendCheck(ExtendCheck.neverAdvance())
- .setCleanup(ll -> ll.removeIf( f -> (((NumberedBloomFilter)
f).value-- == 0))).get();
- final LayeredBloomFilter underTest = new
LayeredBloomFilter(getTestShape(), layerManager );
+ .setCleanup(ll -> ll.removeIf(f -> (((NumberedBloomFilter)
f).value-- == 0))).get();
+ final LayeredBloomFilter underTest = new
LayeredBloomFilter(getTestShape(), layerManager);
assertEquals(1, underTest.getDepth());
underTest.merge(TestingHashers.randomHasher());
underTest.cleanup(); // first count == 2
diff --git
a/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
b/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
index e36ae44a6..8a638bbbf 100644
---
a/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
+++
b/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java
@@ -55,7 +55,7 @@ public class TransformedSplitMapTest extends BulkTest {
final TransformedSplitMap<String, String, String, String> map =
TransformedSplitMap.transformingMap(new HashMap<>(),
NOPTransformer.<String>nopTransformer(),
-
NOPTransformer.<String>nopTransformer() );
+
NOPTransformer.<String>nopTransformer());
final ObjectInputStream in = new ObjectInputStream(new
FileInputStream(TEST_DATA_PATH +
"/TransformedSplitMap.emptyCollection.version4.obj"));
final Object readObject = in.readObject();