lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r542667 - /lucene/java/trunk/src/java/org/apache/lucene/store/BufferedIndexInput.java
Date Tue, 29 May 2007 21:56:44 GMT
Author: mikemccand
Date: Tue May 29 14:56:43 2007
New Revision: 542667

URL: http://svn.apache.org/viewvc?view=rev&rev=542667
Log:
LUCENE-888: fix possible NPE in assert statement

Modified:
    lucene/java/trunk/src/java/org/apache/lucene/store/BufferedIndexInput.java

Modified: lucene/java/trunk/src/java/org/apache/lucene/store/BufferedIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/store/BufferedIndexInput.java?view=diff&rev=542667&r1=542666&r2=542667
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/store/BufferedIndexInput.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/store/BufferedIndexInput.java Tue May 29
14:56:43 2007
@@ -49,7 +49,7 @@
 
   /** Change the buffer size used by this IndexInput */
   public void setBufferSize(int newSize) {
-    assert bufferSize == buffer.length;
+    assert buffer == null || bufferSize == buffer.length;
     if (newSize != bufferSize) {
       checkBufferSize(newSize);
       bufferSize = newSize;



Mime
View raw message