mirror of https://github.com/apache/lucene.git
move assert up to ctor
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1442798 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
df3edbb80f
commit
fc925ded1e
|
@ -278,6 +278,8 @@ public class MultiDocValues {
|
||||||
final OrdinalMap mapping;
|
final OrdinalMap mapping;
|
||||||
|
|
||||||
MultiSortedDocValues(SortedDocValues values[], int docStarts[], OrdinalMap mapping) throws IOException {
|
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.values = values;
|
||||||
this.docStarts = docStarts;
|
this.docStarts = docStarts;
|
||||||
this.mapping = mapping;
|
this.mapping = mapping;
|
||||||
|
@ -294,7 +296,6 @@ public class MultiDocValues {
|
||||||
public void lookupOrd(int ord, BytesRef result) {
|
public void lookupOrd(int ord, BytesRef result) {
|
||||||
int subIndex = (int) mapping.subIndexes.get(ord);
|
int subIndex = (int) mapping.subIndexes.get(ord);
|
||||||
int segmentOrd = (int) (ord - mapping.globalOrdDeltas.get(ord));
|
int segmentOrd = (int) (ord - mapping.globalOrdDeltas.get(ord));
|
||||||
assert subIndex < values.length;
|
|
||||||
values[subIndex].lookupOrd(segmentOrd, result);
|
values[subIndex].lookupOrd(segmentOrd, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue