mirror of https://github.com/apache/lucene.git
protect object against NPE in finally block, as an NPE here would hide the original exception
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@558160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
58027a24bb
commit
86432275f6
|
@ -2273,7 +2273,9 @@ public class IndexWriter {
|
|||
}
|
||||
} 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.
|
||||
|
|
Loading…
Reference in New Issue