lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r769294 - /lucene/java/trunk/src/java/org/apache/lucene/index/SegmentTermEnum.java
Date Tue, 28 Apr 2009 08:33:37 GMT
Author: mikemccand
Date: Tue Apr 28 08:33:37 2009
New Revision: 769294

URL: http://svn.apache.org/viewvc?rev=769294&view=rev
Log:
add defensive asserts for the indexInterval / skipInterval in tis/tii files

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/index/SegmentTermEnum.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentTermEnum.java?rev=769294&r1=769293&r2=769294&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentTermEnum.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentTermEnum.java Tue Apr 28 08:33:37
2009
@@ -82,6 +82,8 @@
           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();



Mime
View raw message