This is an automated email from the ASF dual-hosted git repository.
tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git
The following commit(s) were added to refs/heads/main by this push:
new 53b312ec2 BloomFilterBuilder.validateSizeInputs should not accept
numBits=0 (#725)
53b312ec2 is described below
commit 53b312ec2d32f32261fbaf803a8287f5ebb4ff45
Author: tison <[email protected]>
AuthorDate: Wed Feb 11 13:32:39 2026 +0800
BloomFilterBuilder.validateSizeInputs should not accept numBits=0 (#725)
Signed-off-by: tison <[email protected]>
---
.../org/apache/datasketches/filters/bloomfilter/BloomFilterBuilder.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/datasketches/filters/bloomfilter/BloomFilterBuilder.java
b/src/main/java/org/apache/datasketches/filters/bloomfilter/BloomFilterBuilder.java
index 0c19c64b1..78098878f 100644
---
a/src/main/java/org/apache/datasketches/filters/bloomfilter/BloomFilterBuilder.java
+++
b/src/main/java/org/apache/datasketches/filters/bloomfilter/BloomFilterBuilder.java
@@ -235,7 +235,7 @@ public final class BloomFilterBuilder {
}
private static void validateSizeInputs(final long numBits, final int
numHashes) {
- if (numBits < 0) {
+ if (numBits <= 0) {
throw new SketchesArgumentException("Size of BloomFilter must be
strictly positive. "
+ "Requested: " + numBits);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]