lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gol...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search DateFilter.java
Date Sat, 11 Oct 2003 13:45:51 GMT
goller      2003/10/11 06:45:51

  Modified:    src/java/org/apache/lucene/search DateFilter.java
  Log:
  termDocs.close() moved.
  Before that termDocs was used though it had already been closed!
  
  Revision  Changes    Path
  1.9       +3 -6      jakarta-lucene/src/java/org/apache/lucene/search/DateFilter.java
  
  Index: DateFilter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/DateFilter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DateFilter.java	13 Sep 2003 23:40:29 -0000	1.8
  +++ DateFilter.java	11 Oct 2003 13:45:51 -0000	1.9
  @@ -157,12 +157,8 @@
         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 @@
         }
       } finally {
         enumerator.close();
  +      termDocs.close();
       }
       return bits;
     }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message