Apache Lucene open-source search software
PackedInts.ReaderIterator should not be closeable.
Adrien Granddfc778638195
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.javaindex 97dab57ba42..147eed87848 100644--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java@@ -134,7 +134,6 @@ class VarStraightBytesImpl {docToAddress[lastDocID] = address + offset;}address += numDataBytes; // this is the address after all addr pointers are updated- iter.close();} finally {IOUtils.close(cloneIdx);}diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java b/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.javaindex 8ca3cb72365..f864e28389f 100644--- a/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java@@ -17,7 +17,6 @@ package org.apache.lucene.util.packed;* limitations under the License.*/-import java.io.Closeable;import java.io.IOException;import org.apache.lucene.codecs.CodecUtil;@@ -475,7 +474,7 @@ public class PackedInts {/*** Run-once iterator interface, to decode previously saved PackedInts.*/- public static interface ReaderIterator extends Closeable {+ public static interface ReaderIterator {/** Returns next value */long next() throws IOException;/** Returns at least 1 and at most <code>count</code> next values,@@ -520,13 +519,6 @@ public class PackedInts {public int size() {return valueCount;}-- @Override- public void close() throws IOException {- if (in instanceof Closeable) {- ((Closeable) in).close();- }- }}/**