mirror of https://github.com/apache/lucene.git
LUCENE-3892: add assert
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/pforcodec_3892@1371770 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0df8e43b22
commit
0db218838d
|
@ -231,6 +231,7 @@ final class ForUtil {
|
||||||
private static int bitsRequired(final int[] data) {
|
private static int bitsRequired(final int[] data) {
|
||||||
long or = 0;
|
long or = 0;
|
||||||
for (int i = 0; i < BLOCK_SIZE; ++i) {
|
for (int i = 0; i < BLOCK_SIZE; ++i) {
|
||||||
|
assert data[i] >= 0;
|
||||||
or |= data[i];
|
or |= data[i];
|
||||||
}
|
}
|
||||||
return PackedInts.bitsRequired(or);
|
return PackedInts.bitsRequired(or);
|
||||||
|
|
Loading…
Reference in New Issue