revert LUCENE-781 for now

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@499176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2007-01-23 22:54:40 +00:00
parent fb60f574aa
commit 9a57076257
3 changed files with 2 additions and 28 deletions

View File

@ -332,11 +332,6 @@ Bug fixes
life" due to this, just a possible future problem). (Chuck life" due to this, just a possible future problem). (Chuck
Williams via Mike McCandless) Williams via Mike McCandless)
33. LUCENE-781: Fixed the NullPointerException in MultiReader.isCurrent()
and MultiReader.getVersion(). isCurrent() now returns true only if
all its readers are current. getVersion() now throws an
UnsupportedOperationException. (Daniel Naber)
Optimizations Optimizations
1. LUCENE-586: TermDocs.skipTo() is now more efficient for 1. LUCENE-586: TermDocs.skipTo() is now more efficient for

View File

@ -263,29 +263,6 @@ public class MultiReader extends IndexReader {
return fieldSet; return fieldSet;
} }
/**
* Returns <code>true</code> if all readers are still up-to-date.
*
* @throws IOException
*/
public boolean isCurrent() throws IOException {
for (int i = 0; i < subReaders.length; i++) {
IndexReader reader = subReaders[i];
if (!reader.isCurrent())
return false;
}
return true;
}
/**
* Not implemented.
* @throws UnsupportedOperationException
*/
public long getVersion() {
throw new UnsupportedOperationException("This method is only implemented in " +
"IndexReader, not in MultiReader");
}
} }
class MultiTermEnum extends TermEnum { class MultiTermEnum extends TermEnum {

View File

@ -106,6 +106,7 @@ public class TestMultiReader extends TestCase {
assertTrue(reader != null); assertTrue(reader != null);
} }
/* known to fail, see https://issues.apache.org/jira/browse/LUCENE-781
public void testIsCurrent() throws IOException { public void testIsCurrent() throws IOException {
RAMDirectory ramDir1=new RAMDirectory(); RAMDirectory ramDir1=new RAMDirectory();
addDoc(ramDir1, "test foo", true); addDoc(ramDir1, "test foo", true);
@ -134,5 +135,6 @@ public class TestMultiReader extends TestCase {
iw.addDocument(doc); iw.addDocument(doc);
iw.close(); iw.close();
} }
*/
} }