You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2020/04/07 15:26:03 UTC

[lucene-solr] branch branch_8x updated: LUCENE-9271: Complete fix for setBufferSize.

This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 59d8190  LUCENE-9271: Complete fix for setBufferSize.
59d8190 is described below

commit 59d81909f719dee73e824d6e87ed748be91e414f
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Tue Apr 7 17:24:41 2020 +0200

    LUCENE-9271: Complete fix for setBufferSize.
---
 lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java b/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java
index 8f23c01..d0b78ed 100644
--- a/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java
+++ b/lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java
@@ -79,7 +79,7 @@ public abstract class BufferedIndexInput extends IndexInput implements RandomAcc
     if (newSize != bufferSize) {
       checkBufferSize(newSize);
       bufferSize = newSize;
-      if (buffer != null) {
+      if (buffer != EMPTY_BYTEBUFFER) {
         // Resize the existing buffer and carefully save as
         // many bytes as possible starting from the current
         // bufferPosition