Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-3807: increment buffer on overflow

Simon Willnauer7014621ef6e5
diff --git a/lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java b/lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java
index cb56a519e26..37bd1e2ba14 100644
--- a/lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java
+++ b/lucene/core/src/java/org/apache/lucene/util/ByteBlockPool.java
@@ -304,7 +304,7 @@ public final class ByteBlockPool {
pos = 0;
bytes.length -= bytesToCopy;
bytes.offset += bytesToCopy;
- buffer = buffers[bufferIndex];
+ buffer = buffers[++bufferIndex];
overflow = overflow - BYTE_BLOCK_SIZE;
}
} while (true);