Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

make IFD closeable

Robert Muir182cb4c2f403
diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexFileDeleter.java b/lucene/core/src/java/org/apache/lucene/index/IndexFileDeleter.java
index 73f9f360d99..e6e0e9a0506 100644
--- a/lucene/core/src/java/org/apache/lucene/index/IndexFileDeleter.java
+++ b/lucene/core/src/java/org/apache/lucene/index/IndexFileDeleter.java
@@ -17,6 +17,7 @@ package org.apache.lucene.index;
* limitations under the License.
*/
+import java.io.Closeable;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
@@ -69,7 +70,7 @@ import org.apache.lucene.util.InfoStream;
* directly with no retry logic.
*/
-final class IndexFileDeleter {
+final class IndexFileDeleter implements Closeable {
/* Files that we tried to delete but failed (likely
* because they are open and we are running on Windows),