lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject svn commit: r1412538 - in /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene: codecs/lucene40/values/VarStraightBytesImpl.java util/packed/PackedInts.java
Date Thu, 22 Nov 2012 13:06:57 GMT
Author: jpountz
Date: Thu Nov 22 13:06:56 2012
New Revision: 1412538

URL: http://svn.apache.org/viewvc?rev=1412538&view=rev
Log:
PackedInts.ReaderIterator should not be closeable.

Modified:
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java?rev=1412538&r1=1412537&r2=1412538&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene40/values/VarStraightBytesImpl.java
Thu Nov 22 13:06:56 2012
@@ -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);
           }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java?rev=1412538&r1=1412537&r2=1412538&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java Thu
Nov 22 13:06:56 2012
@@ -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();
-      }
-    }
   }
 
   /**



Mime
View raw message