Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

remove dead code

Robert Muirf2150e2919cf
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++) {