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/index IndexReader.java
Date Tue, 20 Apr 2004 18:21:06 GMT
goller      2004/04/20 11:21:06

  Modified:    src/java/org/apache/lucene/index IndexReader.java
  Log:
  temporary directory in isLocked(String) was never closed
  
  Revision  Changes    Path
  1.31      +5 -2      jakarta-lucene/src/java/org/apache/lucene/index/IndexReader.java
  
  Index: IndexReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/IndexReader.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- IndexReader.java	16 Apr 2004 09:17:05 -0000	1.30
  +++ IndexReader.java	20 Apr 2004 18:21:06 -0000	1.31
  @@ -573,7 +573,10 @@
      * @throws IOException if there is a problem with accessing the index
      */
     public static boolean isLocked(String directory) throws IOException {
  -    return isLocked(FSDirectory.getDirectory(directory, false));
  +    Directory dir = FSDirectory.getDirectory(directory, false);
  +    boolean result = isLocked(dir);
  +    dir.close();
  +    return result;
     }
   
     /**
  
  
  

---------------------------------------------------------------------
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