mirror of https://github.com/apache/lucene.git
LUCENE-888: fix possible NPE in assert statement
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@542667 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3e09257c09
commit
0d5a4755c9
|
@ -49,7 +49,7 @@ public abstract class BufferedIndexInput extends IndexInput {
|
|||
|
||||
/** Change the buffer size used by this IndexInput */
|
||||
public void setBufferSize(int newSize) {
|
||||
assert bufferSize == buffer.length;
|
||||
assert buffer == null || bufferSize == buffer.length;
|
||||
if (newSize != bufferSize) {
|
||||
checkBufferSize(newSize);
|
||||
bufferSize = newSize;
|
||||
|
|
Loading…
Reference in New Issue