Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

- Fix for NPE: http://issues.apache.org/bugzilla/show_bug.cgi?id=30049

Otis Gospodneticcec270c5256c
diff --git a/src/java/org/apache/lucene/index/CompoundFileReader.java b/src/java/org/apache/lucene/index/CompoundFileReader.java
index 3026f676d63..ebf02dc1d6a 100644
--- a/src/java/org/apache/lucene/index/CompoundFileReader.java
+++ b/src/java/org/apache/lucene/index/CompoundFileReader.java
@@ -87,7 +87,7 @@ class CompoundFileReader extends Directory {
success = true;
} finally {
- if (! success) {
+ if (! success && (stream != null)) {
try {
stream.close();
} catch (IOException e) { }