fix test bug

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1421868 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-12-14 14:05:22 +00:00
parent d688310cfb
commit 750e0ef311
1 changed files with 1 additions and 1 deletions

View File

@ -2043,7 +2043,7 @@ public class TestIndexWriter extends LuceneTestCase {
Bits liveDocs = ar.getLiveDocs(); Bits liveDocs = ar.getLiveDocs();
int maxDoc = ar.maxDoc(); int maxDoc = ar.maxDoc();
for (int i = 0; i < maxDoc; i++) { for (int i = 0; i < maxDoc; i++) {
if (liveDocs.get(i)) { if (liveDocs == null || liveDocs.get(i)) {
assertTrue(liveIds.remove(ar.document(i).get("id"))); assertTrue(liveIds.remove(ar.document(i).get("id")));
} }
} }