Java-BloomFilter
Java-BloomFilter copied to clipboard
ArithmeticException in case expectedNumberOElements is 0
I'm getting: java.lang.ArithmeticException: / by zero at com.skjegstad.utils.BloomFilter.contains(BloomFilter.java:345)
after creating filter with expectedNumberOfElements = 0 with constructor: public BloomFilter(double falsePositiveProbability, int expectedNumberOfElements) and check if it contains some element What I'm expecting is either:
- false when calling contains
- exception on creation of filter which will tell me that 0 is bad value and I'm awful person that I passed it