lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1603940 - in /lucene/dev/branches/lucene_solr_4_9: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java
Date Thu, 19 Jun 2014 16:45:54 GMT
Author: rmuir
Date: Thu Jun 19 16:45:53 2014
New Revision: 1603940

URL: http://svn.apache.org/r1603940
Log:
fix off-by-one in checkBufferSize, it must be >= 8

Modified:
    lucene/dev/branches/lucene_solr_4_9/   (props changed)
    lucene/dev/branches/lucene_solr_4_9/lucene/   (props changed)
    lucene/dev/branches/lucene_solr_4_9/lucene/core/   (props changed)
    lucene/dev/branches/lucene_solr_4_9/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java

Modified: lucene/dev/branches/lucene_solr_4_9/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_9/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java?rev=1603940&r1=1603939&r2=1603940&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_9/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java
(original)
+++ lucene/dev/branches/lucene_solr_4_9/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java
Thu Jun 19 16:45:53 2014
@@ -107,8 +107,8 @@ public abstract class BufferedIndexInput
   }
 
   private void checkBufferSize(int bufferSize) {
-    if (bufferSize <= MIN_BUFFER_SIZE)
-      throw new IllegalArgumentException("bufferSize must be greater than MIN_BUFFER_SIZE
(got " + bufferSize + ")");
+    if (bufferSize < MIN_BUFFER_SIZE)
+      throw new IllegalArgumentException("bufferSize must be at least MIN_BUFFER_SIZE (got
" + bufferSize + ")");
   }
 
   @Override



Mime
View raw message