lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r558160 - /lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
Date Fri, 20 Jul 2007 21:38:56 GMT
Author: dnaber
Date: Fri Jul 20 14:38:55 2007
New Revision: 558160

URL: http://svn.apache.org/viewvc?view=rev&rev=558160
Log:
protect object against NPE in finally block, as an NPE here would hide the original exception

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?view=diff&rev=558160&r1=558159&r2=558160
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Fri Jul 20 14:38:55
2007
@@ -2273,7 +2273,9 @@
       }
     } finally {
       // close readers before we attempt to delete now-obsolete segments
-      merger.closeReaders();
+      if (merger != null) {
+        merger.closeReaders();
+      }
     }
 
     // Give deleter a chance to remove files now.



Mime
View raw message