-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: always throw DivideByZeroException
when BloomFilter
is empty
#3502
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was created wrong, it should throw an exception, maybe during the constructor
you think it should be fixed the other way? |
Throw during creation? |
@nan01ab please update accordingly |
updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good fix as well
Description
new BloomFilter
allow to create a bloom filter that length is 0(i.e.m
allow set to0
), but if it's length is 0, thisBloomFilter
will always throwDivideByZeroException
when callAdd
orCheck
.Type of change
Checklist: