lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject [42/50] lucene-solr:jira/SOLR-445: add asserts
Date Mon, 21 Mar 2016 00:44:04 GMT
add asserts


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/85945ef2
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/85945ef2
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/85945ef2

Branch: refs/heads/jira/SOLR-445
Commit: 85945ef2a78bf8dc7fa037ad5f41455f462c6396
Parents: 6ebf615
Author: Mike McCandless <mikemccand@apache.org>
Authored: Thu Mar 17 10:10:28 2016 -0400
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Thu Mar 17 10:10:28 2016 -0400

----------------------------------------------------------------------
 lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/85945ef2/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java
----------------------------------------------------------------------
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 10d97e3..fd3408d 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<rightCount;i++) {
           result = reader.next();
           assert result;
+          assert ordBitSet.get(reader.ord()) == false;
           ordBitSet.set(reader.ord());
         }
       }


Mime
View raw message