Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,9 @@ private void addAll(long[] keys) {

if (hashIndex > 100) {
// if construction doesn't succeed eventually,
// then there is likely a problem with the hash function
// let us not crash the system:
for(int i = 0; i < fingerprints.length; i++) {
fingerprints[i] = (short)0xFFFF;
}
return;
// then there is likely a problem with the hash function.
// It's better fail that either produce non-functional or incorrect filter.
throw new IllegalArgumentException("could not construct filter");
}
// use a new random numbers
seed = Hash.randomSeed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,9 @@ private void addAll(long[] keys) {

if (hashIndex > 100) {
// if construction doesn't succeed eventually,
// then there is likely a problem with the hash function
// let us not crash the system:
for (int i = 0; i < fingerprints.length; i++) {
fingerprints[i] = (int) 0xFFFFFFFF;
}
return;
// then there is likely a problem with the hash function.
// It's better fail that either produce non-functional or incorrect filter.
throw new IllegalArgumentException("could not construct filter");
}
// use a new random numbers
seed = Hash.randomSeed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,9 @@ private void addAll(long[] keys) {

if (hashIndex > 100) {
// if construction doesn't succeed eventually,
// then there is likely a problem with the hash function
// let us not crash the system:
for(int i = 0; i < fingerprints.length; i++) {
fingerprints[i] = (byte)0xFF;
}
return;
// then there is likely a problem with the hash function.
// It's better fail that either produce non-functional or incorrect filter.
throw new IllegalArgumentException("could not construct filter");
}
// use a new random numbers
seed = Hash.randomSeed();
Expand Down