We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5c9142 commit c9a4901Copy full SHA for c9a4901
core/src/main/java/org/elasticsearch/common/util/CountedBitSet.java
@@ -39,15 +39,15 @@ public CountedBitSet(short numBits) {
39
40
@Override
41
public boolean get(int index) {
42
- assert index >= 0;
+ assert 0 <= index && index < this.length();
43
assert bitset == null || onBits < bitset.length() : "Bitset should be released when all bits are set";
44
45
return bitset == null ? true : bitset.get(index);
46
}
47
48
49
public void set(int index) {
50
51
52
53
// Ignore set when bitset is full.
0 commit comments