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:
Christoph Goller 2003-10-11 13:45:51 +00:00
parent b6884a0cba
commit 17af7399fd
1 changed files with 3 additions and 6 deletions

View File

@ -157,12 +157,8 @@ 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;
@ -170,6 +166,7 @@ public class DateFilter extends Filter {
} }
} finally { } finally {
enumerator.close(); enumerator.close();
termDocs.close();
} }
return bits; return bits;
} }