mirror of https://github.com/apache/lucene.git
LUCENE-1199: do defensive check of indexReader != null before trying to close it
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@632879 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3efa1c47ca
commit
33bee3c60c
|
@ -571,7 +571,7 @@ public class IndexModifier {
|
||||||
if (indexWriter != null) {
|
if (indexWriter != null) {
|
||||||
indexWriter.close();
|
indexWriter.close();
|
||||||
indexWriter = null;
|
indexWriter = null;
|
||||||
} else {
|
} else if (indexReader != null) {
|
||||||
indexReader.close();
|
indexReader.close();
|
||||||
indexReader = null;
|
indexReader = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue