lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r154076 - lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
Date Wed, 16 Feb 2005 20:07:40 GMT
Author: dnaber
Date: Wed Feb 16 12:07:38 2005
New Revision: 154076

URL: http://svn.apache.org/viewcvs?view=rev&rev=154076
Log:
throw IllegalArgumentException to avoid endless loop

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

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?view=diff&r1=154075&r2=154076
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Wed Feb 16 12:07:38
2005
@@ -286,8 +286,12 @@
    * the number of files open in a FSDirectory.
    *
    * <p> The default value is 10.
+   * 
+   * @throws IllegalArgumentException if maxBufferedDocs is smaller than 1 
    */
   public void setMaxBufferedDocs(int maxBufferedDocs) {
+    if (maxBufferedDocs < 1)
+      throw new IllegalArgumentException("maxBufferedDocs must at least be 1");
     this.minMergeDocs = maxBufferedDocs;
   }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message