You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2013/02/06 00:33:46 UTC

svn commit: r1442798 - /lucene/dev/branches/lucene4547/lucene/core/src/java/org/apache/lucene/index/MultiDocValues.java

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);
     }