From 85945ef2a78bf8dc7fa037ad5f41455f462c6396 Mon Sep 17 00:00:00 2001 From: Mike McCandless Date: Thu, 17 Mar 2016 10:10:28 -0400 Subject: [PATCH] add asserts --- lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java b/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java index 10d97e3db46..fd3408d4c8d 100644 --- a/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java +++ b/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java @@ -977,12 +977,14 @@ public class BKDWriter implements Closeable { System.arraycopy(reader.packedValue(), splitDim*bytesPerDim, scratch1, 0, bytesPerDim); if (numDims > 1) { + assert ordBitSet.get(reader.ord()) == false; ordBitSet.set(reader.ord()); // Start at 1 because we already did the first value above (so we could keep the split value): for(int i=1;i