From dfc778638195abc2c4df2ca2a160adf0b82acc13 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Thu, 22 Nov 2012 13:06:56 +0000 Subject: [PATCH] PackedInts.ReaderIterator should not be closeable. git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1412538 13f79535-47bb-0310-9956-ffa450edef68 --- .../codecs/lucene40/values/VarStraightBytesImpl.java | 1 - .../java/org/apache/lucene/util/packed/PackedInts.java | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) 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.java index 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.java index 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 count 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(); - } - } } /**