LUCENE-9271: Fix bad assertion.

This commit is contained in:
Adrien Grand 2020-04-07 16:20:09 +02:00
parent 82692e76e0
commit 3363e1aa48
1 changed files with 1 additions and 1 deletions

View File

@ -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;