From f2150e2919cf3eb9fe4714ba0b33f2d51f306533 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 13 Jun 2011 21:43:00 +0000 Subject: [PATCH] remove dead code git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1135300 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/src/java/org/apache/lucene/store/MMapDirectory.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/store/MMapDirectory.java b/lucene/src/java/org/apache/lucene/store/MMapDirectory.java index ab0fc54f719..ee5e14e9953 100644 --- a/lucene/src/java/org/apache/lucene/store/MMapDirectory.java +++ b/lucene/src/java/org/apache/lucene/store/MMapDirectory.java @@ -313,7 +313,6 @@ public class MMapDirectory extends FSDirectory { private class MultiMMapIndexInput extends IndexInput { private ByteBuffer[] buffers; - private int[] bufSizes; // keep here, ByteBuffer.size() method is optional private final long length; @@ -342,7 +341,6 @@ public class MMapDirectory extends FSDirectory { if (((long) nrBuffers * maxBufSize) <= length) nrBuffers++; this.buffers = new ByteBuffer[nrBuffers]; - this.bufSizes = new int[nrBuffers]; long bufferStart = 0; FileChannel rafc = raf.getChannel(); @@ -351,7 +349,6 @@ public class MMapDirectory extends FSDirectory { ? maxBufSize : (int) (length - bufferStart); this.buffers[bufNr] = rafc.map(MapMode.READ_ONLY,bufferStart,bufSize); - this.bufSizes[bufNr] = bufSize; bufferStart += bufSize; } seek(0L); @@ -444,7 +441,6 @@ public class MMapDirectory extends FSDirectory { MultiMMapIndexInput clone = (MultiMMapIndexInput)super.clone(); clone.isClone = true; clone.buffers = new ByteBuffer[buffers.length]; - // No need to clone bufSizes. // Since most clones will use only one buffer, duplicate() could also be // done lazy in clones, e.g. when adapting curBuf. for (int bufNr = 0; bufNr < buffers.length; bufNr++) {