fix off-by-one in checkBufferSize, it must be >= 8

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1603935 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2014-06-19 16:14:34 +00:00
parent d3ccf49f59
commit f5cfa3d06a
1 changed files with 2 additions and 2 deletions

View File

@ -107,8 +107,8 @@ public abstract class BufferedIndexInput extends IndexInput implements RandomAcc
}
private void checkBufferSize(int bufferSize) {
if (bufferSize <= MIN_BUFFER_SIZE)
throw new IllegalArgumentException("bufferSize must be greater than MIN_BUFFER_SIZE (got " + bufferSize + ")");
if (bufferSize < MIN_BUFFER_SIZE)
throw new IllegalArgumentException("bufferSize must be at least MIN_BUFFER_SIZE (got " + bufferSize + ")");
}
@Override