mirror of https://github.com/apache/lucene.git
LUCENE-2972: move numBits maintenance under assert
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1127247 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5d0b7d21ae
commit
a636ef94d1
|
@ -306,7 +306,7 @@ public class OpenBitSet extends DocIdSet implements Bits, Cloneable {
|
|||
ensureCapacity(index+1);
|
||||
wlen = wordNum+1;
|
||||
}
|
||||
numBits = Math.max(numBits, index+1);
|
||||
assert (numBits = Math.max(numBits, index+1)) >= 0;
|
||||
return wordNum;
|
||||
}
|
||||
|
||||
|
@ -693,7 +693,7 @@ public class OpenBitSet extends DocIdSet implements Bits, Cloneable {
|
|||
public void union(OpenBitSet other) {
|
||||
int newLen = Math.max(wlen,other.wlen);
|
||||
ensureCapacityWords(newLen);
|
||||
numBits = Math.max(other.numBits, numBits);
|
||||
assert (numBits = Math.max(other.numBits, numBits)) >= 0;
|
||||
|
||||
long[] thisArr = this.bits;
|
||||
long[] otherArr = other.bits;
|
||||
|
@ -722,7 +722,7 @@ public class OpenBitSet extends DocIdSet implements Bits, Cloneable {
|
|||
public void xor(OpenBitSet other) {
|
||||
int newLen = Math.max(wlen,other.wlen);
|
||||
ensureCapacityWords(newLen);
|
||||
numBits = Math.max(other.numBits, numBits);
|
||||
assert (numBits = Math.max(other.numBits, numBits)) >= 0;
|
||||
|
||||
long[] thisArr = this.bits;
|
||||
long[] otherArr = other.bits;
|
||||
|
|
Loading…
Reference in New Issue