From 954957c987c8d22b8988b616be5ae4c731145c86 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 19 Jun 2015 13:09:12 +0000 Subject: [PATCH] add defensive asserts git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1686404 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/core/src/java/org/apache/lucene/util/fst/BytesStore.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lucene/core/src/java/org/apache/lucene/util/fst/BytesStore.java b/lucene/core/src/java/org/apache/lucene/util/fst/BytesStore.java index 8a5176c648c..9a7cca705c3 100644 --- a/lucene/core/src/java/org/apache/lucene/util/fst/BytesStore.java +++ b/lucene/core/src/java/org/apache/lucene/util/fst/BytesStore.java @@ -98,6 +98,8 @@ class BytesStore extends DataOutput implements Accountable { while (len > 0) { int chunk = blockSize - nextWrite; if (len <= chunk) { + assert b != null; + assert current != null; System.arraycopy(b, offset, current, nextWrite, len); nextWrite += len; break;