mirror of https://github.com/apache/lucene.git
LUCENE-9271: Fix bad assertion.
This commit is contained in:
parent
82692e76e0
commit
3363e1aa48
|
@ -75,7 +75,7 @@ public abstract class BufferedIndexInput extends IndexInput implements RandomAcc
|
|||
|
||||
/** Change the buffer size used by this IndexInput */
|
||||
public final void setBufferSize(int newSize) {
|
||||
assert buffer == null || bufferSize == buffer.capacity(): "buffer=" + buffer + " bufferSize=" + bufferSize + " buffer.length=" + (buffer != null ? buffer.capacity() : 0);
|
||||
assert buffer == EMPTY_BYTEBUFFER || bufferSize == buffer.capacity(): "buffer=" + buffer + " bufferSize=" + bufferSize + " buffer.length=" + (buffer != null ? buffer.capacity() : 0);
|
||||
if (newSize != bufferSize) {
|
||||
checkBufferSize(newSize);
|
||||
bufferSize = newSize;
|
||||
|
|
Loading…
Reference in New Issue