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:
Michael McCandless 2007-05-29 21:56:43 +00:00
parent 3e09257c09
commit 0d5a4755c9
1 changed files with 1 additions and 1 deletions

View File

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