lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1442798 - /lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
Date Tue, 05 Feb 2013 23:33:46 GMT
Author: rmuir
Date: Tue Feb  5 23:33:46 2013
New Revision: 1442798

URL: http://svn.apache.org/viewvc?rev=1442798&view=rev
Log:
move assert up to ctor

Modified:
    lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java

Modified: lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java?rev=1442798&r1=1442797&r2=1442798&view=diff
==============================================================================
--- lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
(original)
+++ lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java
Tue Feb  5 23:33:46 2013
@@ -278,6 +278,8 @@ public class MultiDocValues {
     final OrdinalMap mapping;
   
     MultiSortedDocValues(SortedDocValues values[], int docStarts[], OrdinalMap mapping) throws
IOException {
+      assert values.length == mapping.ordDeltas.length;
+      assert docStarts.length == values.length + 1;
       this.values = values;
       this.docStarts = docStarts;
       this.mapping = mapping;
@@ -294,7 +296,6 @@ public class MultiDocValues {
     public void lookupOrd(int ord, BytesRef result) {
       int subIndex = (int) mapping.subIndexes.get(ord);
       int segmentOrd = (int) (ord - mapping.globalOrdDeltas.get(ord));
-      assert subIndex < values.length;
       values[subIndex].lookupOrd(segmentOrd, result);
     }
  



Mime
View raw message