mirror of https://github.com/apache/lucene.git
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:
parent
28ced818d3
commit
18587e58c9
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue