mirror of https://github.com/apache/lucene.git
termDocs.close() moved.
Before that termDocs was used though it had already been closed! git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150090 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b6884a0cba
commit
17af7399fd
|
@ -157,19 +157,16 @@ public class DateFilter extends Filter {
|
||||||
Term stop = new Term(field, end);
|
Term stop = new Term(field, end);
|
||||||
while (enumerator.term().compareTo(stop) <= 0) {
|
while (enumerator.term().compareTo(stop) <= 0) {
|
||||||
termDocs.seek(enumerator.term());
|
termDocs.seek(enumerator.term());
|
||||||
try {
|
|
||||||
while (termDocs.next()) {
|
while (termDocs.next()) {
|
||||||
bits.set(termDocs.doc());
|
bits.set(termDocs.doc());
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
termDocs.close();
|
|
||||||
}
|
|
||||||
if (!enumerator.next()) {
|
if (!enumerator.next()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
enumerator.close();
|
enumerator.close();
|
||||||
|
termDocs.close();
|
||||||
}
|
}
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue