Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

make sure to close the IndexInput used to read index version

Michael McCandless0c6efd3dee27
diff --git a/src/java/org/apache/lucene/index/CheckIndex.java b/src/java/org/apache/lucene/index/CheckIndex.java
index a6d47120170..d9ce202b0c1 100644
--- a/src/java/org/apache/lucene/index/CheckIndex.java
+++ b/src/java/org/apache/lucene/index/CheckIndex.java
@@ -90,6 +90,9 @@ public class CheckIndex {
out.println("ERROR: could not read segment file version in directory");
t.printStackTrace(out);
return false;
+ } finally {
+ if (input != null)
+ input.close();
}
String sFormat = "";