Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
4.5
Description
src/main/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilter.java
try
{|
| filter.add(BitCountProducer.from(hasher.uniqueIndices(shape)));|
| }
catch (IndexOutOfBoundsException e) { |
throw new IllegalArgumentException( |
Member
aherbert on 27 Feb
Why change the IOOB exception to an IAE? Neither are documented to be thrown by either add or merge. So here you have inconsistent exceptions being thrown.
Note: If you rethrow the exception you should include the original exception as the cause.
I would just leave this as an IOOB exception and add it to the method javadocs that this will occur for invalid indices.
Claude-at-Instaclustr on 10 Mar
I think this is a documentation issue. We have specific comments for mergeInPlace that states it throws an illgetlArgumentException on numbers out of range. merge() and mergeInPlace() need to be consistent across all the implementations.
Attachments
Issue Links
- is a child of
-
COLLECTIONS-728 BloomFilter contribution
-
- Resolved
-