Permalink
Browse files

Array out-of-bounds exception with bool filter, closes #1400.

  • Loading branch information...
1 parent b2769b1 commit 72ad72248034b2368c8931bb08bc060c73d6e701 @kimchy kimchy committed Oct 15, 2011
@@ -72,12 +72,12 @@ public static void and(FixedBitSet into, DocIdSet other) throws IOException {
}
} else {
if (other == null) {
- into.clear(0, into.length() + 1);
+ into.clear(0, into.length());
} else {
// copied from OpenBitSetDISI#inPlaceAnd
DocIdSetIterator disi = other.iterator();
if (disi == null) {
- into.clear(0, into.length() + 1);
+ into.clear(0, into.length());
} else {
int bitSetDoc = into.nextSetBit(0);
int disiDoc;
@@ -86,7 +86,7 @@ public static void and(FixedBitSet into, DocIdSet other) throws IOException {
bitSetDoc = into.nextSetBit(disiDoc + 1);
}
if (bitSetDoc != -1) {
- into.clear(bitSetDoc, into.length() + 1);
+ into.clear(bitSetDoc, into.length());
}
}
}

0 comments on commit 72ad722

Please sign in to comment.