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 2022/11/06 10:56:57 UTC
[commons-collections] branch master updated: Fixed typos originally reported in pull #323 (#349)
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
The following commit(s) were added to refs/heads/master by this push:
new b66b6cacb Fixed typos originally reported in pull #323 (#349)
b66b6cacb is described below
commit b66b6cacbb461e66a834a2f44a17f5b62e5104b2
Author: Claude Warren <cl...@apache.org>
AuthorDate: Sun Nov 6 04:56:51 2022 -0600
Fixed typos originally reported in pull #323 (#349)
---
.../java/org/apache/commons/collections4/bloomfilter/BitMap.java | 2 +-
.../commons/collections4/bloomfilter/CountingLongPredicate.java | 2 +-
.../java/org/apache/commons/collections4/bloomfilter/Shape.java | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/BitMap.java b/src/main/java/org/apache/commons/collections4/bloomfilter/BitMap.java
index d6e1c11ee..bea4f0178 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/BitMap.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/BitMap.java
@@ -87,7 +87,7 @@ public class BitMap {
// An integer divide by 64 is equivalent to a shift of 6 bits if the integer is
// positive.
// We do not explicitly check for a negative here. Instead we use a
- // a signed shift. Any negative index will produce a negative value
+ // signed shift. Any negative index will produce a negative value
// by sign-extension and if used as an index into an array it will throw an
// exception.
return bitIndex >> DIVIDE_BY_64;
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingLongPredicate.java b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingLongPredicate.java
index 6acb3900d..c8716f922 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingLongPredicate.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingLongPredicate.java
@@ -20,7 +20,7 @@ import java.util.function.LongPredicate;
/**
* A long predicate that applies the test func to each member of the @{code ary} in sequence for each call to @{code test()}.
- * if the @{code ary} is exhausted, the subsequent calls to to @{code test} are executed with a zero value.
+ * if the @{code ary} is exhausted, the subsequent calls to @{code test} are executed with a zero value.
* If the calls to @{code test} do not exhaust the @{code ary} the @{code forEachRemaining} method can be called to
* execute the @code{text} with a zero value for each remaining @{code idx} value.
*
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/Shape.java b/src/main/java/org/apache/commons/collections4/bloomfilter/Shape.java
index a3256fe1a..90ffd91d0 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/Shape.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/Shape.java
@@ -415,7 +415,7 @@ public final class Shape {
}
/**
- * Calculates the number of hash functions given numberOfItems and numberofBits.
+ * Calculates the number of hash functions given numberOfItems and numberOfBits.
* This is a method so that the calculation is consistent across all constructors.
*
* @param numberOfItems the number of items in the filter.
@@ -431,9 +431,9 @@ public final class Shape {
throw new IllegalArgumentException(
String.format("Filter too small: Calculated number of hash functions (%s) was less than 1", k));
}
- // Normally we would check that numberofHashFunctions <= Integer.MAX_VALUE but
+ // Normally we would check that numberOfHashFunctions <= Integer.MAX_VALUE but
// since numberOfBits is at most Integer.MAX_VALUE the numerator of
- // numberofHashFunctions is ln(2) * Integer.MAX_VALUE = 646456992.9449 the
+ // numberOfHashFunctions is ln(2) * Integer.MAX_VALUE = 646456992.9449 the
// value of k can not be above Integer.MAX_VALUE.
return (int) k;
}