diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 79ddabb06bc..e939ea00c37 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -711,6 +711,12 @@ Bug fixes * LUCENE-3627: Don't let an errant 0-byte segments_N file corrupt the index. (Ken McCracken via Mike McCandless) +* LUCENE-3630: The internal method MultiReader.doOpenIfChanged(boolean doClone) + was overriding IndexReader.doOpenIfChanged(boolean readOnly), so changing the + contract of the overridden method. This method was renamed and made private. + In ParallelReader the bug was not existent, but the implementation method + was also made private. (Uwe Schindler) + Documentation * LUCENE-3597: Fixed incorrect grouping documentation. (Martijn van Groningen, Robert Muir) diff --git a/lucene/src/java/org/apache/lucene/index/MultiReader.java b/lucene/src/java/org/apache/lucene/index/MultiReader.java index fdc364dfe4f..94f12da290e 100644 --- a/lucene/src/java/org/apache/lucene/index/MultiReader.java +++ b/lucene/src/java/org/apache/lucene/index/MultiReader.java @@ -108,7 +108,7 @@ public class MultiReader extends IndexReader implements Cloneable { */ @Override protected synchronized IndexReader doOpenIfChanged() throws CorruptIndexException, IOException { - return doOpenIfChanged(false); + return doReopen(false); } /** @@ -123,7 +123,7 @@ public class MultiReader extends IndexReader implements Cloneable { @Override public synchronized Object clone() { try { - return doOpenIfChanged(true); + return doReopen(true); } catch (Exception ex) { throw new RuntimeException(ex); } @@ -141,7 +141,7 @@ public class MultiReader extends IndexReader implements Cloneable { * @throws CorruptIndexException * @throws IOException */ - protected IndexReader doOpenIfChanged(boolean doClone) throws CorruptIndexException, IOException { + private IndexReader doReopen(boolean doClone) throws CorruptIndexException, IOException { ensureOpen(); boolean changed = false; diff --git a/lucene/src/java/org/apache/lucene/index/ParallelReader.java b/lucene/src/java/org/apache/lucene/index/ParallelReader.java index 8ce4258c3a8..7b7bd52366e 100644 --- a/lucene/src/java/org/apache/lucene/index/ParallelReader.java +++ b/lucene/src/java/org/apache/lucene/index/ParallelReader.java @@ -247,7 +247,7 @@ public class ParallelReader extends IndexReader { return doReopen(false); } - protected IndexReader doReopen(boolean doClone) throws CorruptIndexException, IOException { + private IndexReader doReopen(boolean doClone) throws CorruptIndexException, IOException { ensureOpen(); boolean reopened = false;