lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r635871 - in /lucene/java/branches/lucene_2_3: CHANGES.txt src/java/org/apache/lucene/index/IndexModifier.java
Date Tue, 11 Mar 2008 10:35:35 GMT
Author: mikemccand
Date: Tue Mar 11 03:35:19 2008
New Revision: 635871

URL: http://svn.apache.org/viewvc?rev=635871&view=rev
Log:
LUCENE-1199 (porting to 2.3): added defensive check for indexReader != null in IndexModifier

Modified:
    lucene/java/branches/lucene_2_3/CHANGES.txt
    lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/IndexModifier.java

Modified: lucene/java/branches/lucene_2_3/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/CHANGES.txt?rev=635871&r1=635870&r2=635871&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_3/CHANGES.txt (original)
+++ lucene/java/branches/lucene_2_3/CHANGES.txt Tue Mar 11 03:35:19 2008
@@ -13,6 +13,9 @@
  3. LUCENE-1198: Don't corrupt index if an exception happens inside
     DocumentsWriter.init (Mike McCandless)
 
+ 4. LUCENE-1199: Added defensive check for null indexReader before
+    calling close in IndexModifier.close() (Mike McCandless)
+
 ======================= Release 2.3.1 2008-02-22 =======================
 
 Bug fixes

Modified: lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/IndexModifier.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/IndexModifier.java?rev=635871&r1=635870&r2=635871&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/IndexModifier.java (original)
+++ lucene/java/branches/lucene_2_3/src/java/org/apache/lucene/index/IndexModifier.java Tue
Mar 11 03:35:19 2008
@@ -572,7 +572,7 @@
       if (indexWriter != null) {
         indexWriter.close();
         indexWriter = null;
-      } else {
+      } else if (indexReader != null) {
         indexReader.close();
         indexReader = null;
       }



Mime
View raw message