fix reuse bug

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1364912 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-07-24 06:28:24 +00:00
parent 28ced818d3
commit 18587e58c9
2 changed files with 2 additions and 2 deletions

View File

@ -1852,7 +1852,7 @@ public class DirectPostingsFormat extends PostingsFormat {
public DocsEnum reset(int[] docIDs, int[] freqs) {
this.docIDs = docIDs;
this.freqs = freqs;
upto = -1;
docID = upto = -1;
return this;
}

View File

@ -554,7 +554,7 @@ public class TestPostingsFormat extends LuceneTestCase {
assertNotNull("null DocsEnum", docsEnum);
int initialDocID = docsEnum.docID();
assertTrue("inital docID should be -1 or NO_MORE_DOCS", initialDocID == -1 || initialDocID == DocsEnum.NO_MORE_DOCS);
assertTrue("inital docID should be -1 or NO_MORE_DOCS: " + docsEnum, initialDocID == -1 || initialDocID == DocsEnum.NO_MORE_DOCS);
if (VERBOSE) {
if (prevDocsEnum == null) {