lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r561162 - in /lucene/java/trunk: CHANGES.txt src/java/org/apache/lucene/index/FilterIndexReader.java src/test/org/apache/lucene/index/TestFilterIndexReader.java
Date Mon, 30 Jul 2007 22:29:57 GMT
Author: buschmi
Date: Mon Jul 30 15:29:56 2007
New Revision: 561162

URL: http://svn.apache.org/viewvc?view=rev&rev=561162
Log:
LUCENE-970: FilterIndexReader now implements isOptimized().

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/index/FilterIndexReader.java
    lucene/java/trunk/src/test/org/apache/lucene/index/TestFilterIndexReader.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?view=diff&rev=561162&r1=561161&r2=561162
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Mon Jul 30 15:29:56 2007
@@ -54,6 +54,9 @@
     in case the index has multiple segments. The public MultiReader 
     now extends MultiSegmentReader and is intended to be used by users
     who want to add their own subreaders. (Daniel Naber, Michael Busch)
+
+ 8. LUCENE-970: FilterIndexReader now implements isOptimized(). Before
+    a call of isOptimized() would throw a NPE. (Michael Busch)
       
 New features
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/FilterIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/FilterIndexReader.java?view=diff&rev=561162&r1=561161&r2=561162
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/FilterIndexReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/FilterIndexReader.java Mon Jul 30 15:29:56
2007
@@ -217,4 +217,9 @@
     ensureOpen();
     return in.isCurrent();
   }
+  
+  public boolean isOptimized() {
+    ensureOpen();
+    return in.isOptimized();
+  }
 }

Modified: lucene/java/trunk/src/test/org/apache/lucene/index/TestFilterIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/index/TestFilterIndexReader.java?view=diff&rev=561162&r1=561161&r2=561162
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/index/TestFilterIndexReader.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/index/TestFilterIndexReader.java Mon Jul
30 15:29:56 2007
@@ -112,6 +112,8 @@
 
     IndexReader reader = new TestReader(IndexReader.open(directory));
 
+    assertTrue(reader.isOptimized());
+    
     TermEnum terms = reader.terms();
     while (terms.next()) {
       assertTrue(terms.term().text().indexOf('e') != -1);



Mime
View raw message