From 17af7399fd88fc8ed239399487f9a616b74092ce Mon Sep 17 00:00:00 2001 From: Christoph Goller Date: Sat, 11 Oct 2003 13:45:51 +0000 Subject: [PATCH] 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 --- src/java/org/apache/lucene/search/DateFilter.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/lucene/search/DateFilter.java b/src/java/org/apache/lucene/search/DateFilter.java index a8cc8e9b1ce..385305296c7 100644 --- a/src/java/org/apache/lucene/search/DateFilter.java +++ b/src/java/org/apache/lucene/search/DateFilter.java @@ -157,12 +157,8 @@ public class DateFilter extends Filter { Term stop = new Term(field, end); while (enumerator.term().compareTo(stop) <= 0) { termDocs.seek(enumerator.term()); - try { - while (termDocs.next()) { - bits.set(termDocs.doc()); - } - } finally { - termDocs.close(); + while (termDocs.next()) { + bits.set(termDocs.doc()); } if (!enumerator.next()) { break; @@ -170,6 +166,7 @@ public class DateFilter extends Filter { } } finally { enumerator.close(); + termDocs.close(); } return bits; }