add defensive asserts for the indexInterval / skipInterval in tis/tii files

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@769294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-04-28 08:33:37 +00:00
parent 6fd8d227d9
commit 984ac64054
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,8 @@ final class SegmentTermEnum extends TermEnum implements Cloneable {
maxSkipLevels = input.readInt();
}
}
assert indexInterval > 0: "indexInterval=" + indexInterval + " is negative; must be > 0";
assert skipInterval > 0: "skipInterval=" + skipInterval + " is negative; must be > 0";
}
if (format > TermInfosWriter.FORMAT_VERSION_UTF8_LENGTH_IN_BYTES) {
termBuffer.setPreUTF8Strings();