Merged revision(s) 1212754 from lucene/dev/branches/branch_3x:

LUCENE-3630: Fixed naming of the internal method MultiReader.doOpenIfChanged(boolean doClone) that was overriding IndexReader.doOpenIfChanged(boolean readOnly), so changing the contract of the overridden method

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1212755 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2011-12-10 09:51:42 +00:00
parent fd468d4e6b
commit dd9cc8d4d0
3 changed files with 10 additions and 4 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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;