mirror of https://github.com/apache/lucene.git
throw IllegalArgumentException to avoid endless loop
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@154076 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
28e712b2ee
commit
52537afdb6
|
@ -286,8 +286,12 @@ public class IndexWriter {
|
|||
* 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue