mirror of https://github.com/apache/lucene.git
add defensive asserts
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1686404 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
982a965832
commit
954957c987
|
@ -98,6 +98,8 @@ class BytesStore extends DataOutput implements Accountable {
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
int chunk = blockSize - nextWrite;
|
int chunk = blockSize - nextWrite;
|
||||||
if (len <= chunk) {
|
if (len <= chunk) {
|
||||||
|
assert b != null;
|
||||||
|
assert current != null;
|
||||||
System.arraycopy(b, offset, current, nextWrite, len);
|
System.arraycopy(b, offset, current, nextWrite, len);
|
||||||
nextWrite += len;
|
nextWrite += len;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue