lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r833968 [8/10] - in /lucene/java/branches/flex_1458: ./ contrib/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/ contrib/analyzers/common/src/java/org/apache/...
Date Mon, 09 Nov 2009 04:02:02 GMT
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FuzzyQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FuzzyQuery.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FuzzyQuery.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FuzzyQuery.java Mon Nov  9 04:01:50 2009
@@ -19,10 +19,10 @@
 
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.util.PriorityQueue;
 import org.apache.lucene.util.ToStringUtils;
 
 import java.io.IOException;
+import java.util.PriorityQueue;
 
 /** Implements the fuzzy search query. The similarity measurement
  * is based on the Levenshtein (edit distance) algorithm.
@@ -138,41 +138,41 @@
       return new TermQuery(term);
     }
 
+    int maxSize = BooleanQuery.getMaxClauseCount();
+    PriorityQueue<ScoreTerm> stQueue = new PriorityQueue<ScoreTerm>(1024);
     //nocommit: use termsEnum
     FilteredTermEnum enumerator = getEnum(reader);
-    int maxClauseCount = BooleanQuery.getMaxClauseCount();
-    ScoreTermQueue stQueue = new ScoreTermQueue(maxClauseCount);
-    ScoreTerm reusableST = null;
-
     try {
+      ScoreTerm bottomSt = null;
       do {
-        float score = 0.0f;
-        Term t = enumerator.term();
-        if (t != null) {
-          score = enumerator.difference();
-          if (reusableST == null) {
-            reusableST = new ScoreTerm(t, score);
-          } else if (score >= reusableST.score) {
-            // reusableST holds the last "rejected" entry, so, if
-            // this new score is not better than that, there's no
-            // need to try inserting it
-            reusableST.score = score;
-            reusableST.term = t;
-          } else {
-            continue;
+        final Term t = enumerator.term();
+        if (t == null) break;
+        ScoreTerm st = new ScoreTerm(t, enumerator.difference());
+        if (stQueue.size() < maxSize) {
+          // record the current bottom item
+          if (bottomSt == null || st.compareTo(bottomSt) > 0) {
+            bottomSt = st;
+          }
+          // add to PQ, as it is not yet filled up
+          stQueue.offer(st);
+        } else {
+          assert bottomSt != null;
+          // only add to PQ, if the ScoreTerm is greater than the current bottom,
+          // as all entries will be enqueued after the current bottom and will never be visible
+          if (st.compareTo(bottomSt) < 0) {
+            stQueue.offer(st);
           }
-
-          reusableST = stQueue.insertWithOverflow(reusableST);
         }
+        //System.out.println("current: "+st.term+"("+st.score+"), bottom: "+bottomSt.term+"("+bottomSt.score+")");
       } while (enumerator.next());
     } finally {
       enumerator.close();
     }
     
     BooleanQuery query = new BooleanQuery(true);
-    int size = stQueue.size();
+    int size = Math.min(stQueue.size(), maxSize);
     for(int i = 0; i < size; i++){
-      ScoreTerm st = stQueue.pop();
+      ScoreTerm st = stQueue.poll();
       TermQuery tq = new TermQuery(st.term);      // found a match
       tq.setBoost(getBoost() * st.score); // set the boost
       query.add(tq, BooleanClause.Occur.SHOULD);          // add to query
@@ -180,10 +180,28 @@
 
     return query;
   }
+  
+  protected static class ScoreTerm implements Comparable<ScoreTerm> {
+    public Term term;
+    public float score;
+    
+    public ScoreTerm(Term term, float score){
+      this.term = term;
+      this.score = score;
+    }
+    
+    public int compareTo(ScoreTerm other) {
+      if (this.score == other.score)
+        return this.term.compareTo(other.term);
+      else
+        // inverse ordering!!!
+        return Float.compare(other.score, this.score);
+    }
+  }
     
   @Override
   public String toString(String field) {
-    StringBuilder buffer = new StringBuilder();
+    final StringBuilder buffer = new StringBuilder();
     if (!term.field().equals(field)) {
         buffer.append(term.field());
         buffer.append(":");
@@ -195,32 +213,6 @@
     return buffer.toString();
   }
   
-  protected static class ScoreTerm {
-    public Term term;
-    public float score;
-    
-    public ScoreTerm(Term term, float score){
-      this.term = term;
-      this.score = score;
-    }
-  }
-  
-  protected static class ScoreTermQueue extends PriorityQueue<ScoreTerm> {
-    
-    public ScoreTermQueue(int size){
-      initialize(size);
-    }
-    
-    @Override
-    protected boolean lessThan(ScoreTerm termA, ScoreTerm termB) {
-      if (termA.score == termB.score)
-        return termA.term.compareTo(termB.term) > 0;
-      else
-        return termA.score < termB.score;
-    }
-    
-  }
-
   @Override
   public int hashCode() {
     final int prime = 31;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/NumericRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/NumericRangeQuery.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/NumericRangeQuery.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/NumericRangeQuery.java Mon Nov  9 04:01:50 2009
@@ -370,8 +370,14 @@
       (Boolean.valueOf(maxInclusive).hashCode()^0x733fa5fe);
   }
   
+  // field must be interned after reading from stream
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    in.defaultReadObject();
+    field = StringHelper.intern(field);
+  }
+
   // members (package private, to be also fast accessible by NumericRangeTermEnum)
-  final String field;
+  String field;
   final int precisionStep, valSize;
   final T min, max;
   final boolean minInclusive,maxInclusive;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/SortField.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/SortField.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/SortField.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/SortField.java Mon Nov  9 04:01:50 2009
@@ -106,8 +106,6 @@
   // Used for CUSTOM sort
   private FieldComparatorSource comparatorSource;
 
-  private boolean useLegacy = false; // remove in Lucene 3.0
-
   /** Creates a sort by terms in the given field with the type of term
    * values explicitly given.
    * @param field  Name of field to sort by.  Can be <code>null</code> if
@@ -354,6 +352,12 @@
     return hash;
   }
 
+  // field must be interned after reading from stream
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    in.defaultReadObject();
+    if (field != null)
+      field = StringHelper.intern(field);
+  }
 
   /** Returns the {@link FieldComparator} to use for
    * sorting.

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/Lock.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/Lock.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/Lock.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/Lock.java Mon Nov  9 04:01:50 2009
@@ -104,7 +104,7 @@
 
   /** Returns true if the resource is currently locked.  Note that one must
    * still call {@link #obtain()} before using the resource. */
-  public abstract boolean isLocked();
+  public abstract boolean isLocked() throws IOException;
 
 
   /** Utility class for executing code with exclusive access. */

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/VerifyingLockFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/VerifyingLockFactory.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/VerifyingLockFactory.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/store/VerifyingLockFactory.java Mon Nov  9 04:01:50 2009
@@ -84,7 +84,7 @@
     }
 
     @Override
-    public synchronized boolean isLocked() {
+    public synchronized boolean isLocked() throws IOException {
       return lock.isLocked();
     }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/CloseableThreadLocal.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/CloseableThreadLocal.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/CloseableThreadLocal.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/CloseableThreadLocal.java Mon Nov  9 04:01:50 2009
@@ -17,11 +17,11 @@
  * limitations under the License.
  */
 
-import java.util.Map;
+import java.io.Closeable;
+import java.lang.ref.WeakReference;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.lang.ref.WeakReference;
-import java.io.Closeable;
+import java.util.Map;
 
 /** Java's builtin ThreadLocal has a serious flaw:
  *  it can take an arbitrarily long amount of time to
@@ -41,7 +41,14 @@
  *  separately holding a hard reference to each stored
  *  value.  When you call {@link #close}, these hard
  *  references are cleared and then GC is freely able to
- *  reclaim space by objects stored in it. */
+ *  reclaim space by objects stored in it.
+ *
+ *  We can not rely on {@link ThreadLocal#remove()} as it
+ *  only removes the value for the caller thread, whereas
+ *  {@link #close} takes care of all
+ *  threads.  You should not call {@link #close} until all
+ *  threads are done using the instance.
+ */
 
 public class CloseableThreadLocal<T> implements Closeable {
 
@@ -88,6 +95,11 @@
     // all values we were storing are weak (unless somewhere
     // else is still using them) and so GC may reclaim them:
     hardRefs = null;
+    // Take care of the current thread right now; others will be
+    // taken care of via the WeakReferences.
+    if (t != null) {
+      t.remove();
+    }
     t = null;
   }
 }

Modified: lucene/java/branches/flex_1458/src/site/src/documentation/content/xdocs/contributions.xml
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/site/src/documentation/content/xdocs/contributions.xml?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/site/src/documentation/content/xdocs/contributions.xml (original)
+++ lucene/java/branches/flex_1458/src/site/src/documentation/content/xdocs/contributions.xml Mon Nov  9 04:01:50 2009
@@ -322,6 +322,29 @@
                     </tr>
                 </table>
             </section>
+            <section id="LuSQL">
+                <title>LuSQL - Index databases with Lucene</title>
+                <table>
+                    <tr>
+                        <th width="%1">
+                            URL
+                        </th>
+                        <td>
+                            <a href="http://lab.cisti-icist.nrc-cnrc.gc.ca/cistilabswiki/index.php/LuSql">
+                                http://lab.cisti-icist.nrc-cnrc.gc.ca/cistilabswiki/index.php/LuSql
+                            </a>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th width="%1">
+                            author
+                        </th>
+                        <td>
+                            Glen Newton
+                        </td>
+                    </tr>
+                </table>
+            </section>
         </section>
     </body>
 </document>

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestMergeSchedulerExternal.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestMergeSchedulerExternal.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestMergeSchedulerExternal.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestMergeSchedulerExternal.java Mon Nov  9 04:01:50 2009
@@ -55,6 +55,7 @@
       }
     }
 
+    @Override
     protected MergeThread getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge) throws IOException {
       MergeThread thread = new MyMergeThread(writer, merge);
       thread.setThreadPriority(getMergeThreadPriority());
@@ -63,10 +64,12 @@
       return thread;
     }
 
+    @Override
     protected void handleMergeException(Throwable t) {
       excCalled = true;
     }
 
+    @Override
     protected void doMerge(MergePolicy.OneMerge merge) throws IOException {
       mergeCalled = true;
       super.doMerge(merge);
@@ -74,6 +77,7 @@
   }
 
   private static class FailOnlyOnMerge extends MockRAMDirectory.Failure {
+    @Override
     public void eval(MockRAMDirectory dir)  throws IOException {
       StackTraceElement[] trace = new Exception().getStackTrace();
       for (int i = 0; i < trace.length; i++) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/TestSnapshotDeletionPolicy.java Mon Nov  9 04:01:50 2009
@@ -118,6 +118,7 @@
     writer.setMaxBufferedDocs(2);
 
     final Thread t = new Thread() {
+        @Override
         public void run() {
           Document doc = new Document();
           doc.add(new Field("content", "aaa", Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestAnalyzers.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestAnalyzers.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestAnalyzers.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestAnalyzers.java Mon Nov  9 04:01:50 2009
@@ -125,6 +125,7 @@
       super(org.apache.lucene.util.Version.LUCENE_CURRENT);
     }
   
+    @Override
     public TokenStream tokenStream(String field, Reader reader) {
       return new WhitespaceAnalyzer().tokenStream(field, reader);
     }
@@ -150,6 +151,7 @@
   byte[] data = new byte[1];
   Payload p = new Payload(data,0,1);
 
+  @Override
   public boolean incrementToken() throws IOException {
     boolean hasNext = input.incrementToken();
     if (!hasNext) return false;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java Mon Nov  9 04:01:50 2009
@@ -44,6 +44,7 @@
       private TermAttribute termAtt = addAttribute(TermAttribute.class);
       private OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);
       
+      @Override
       public boolean incrementToken() throws IOException {
         if (index == tokens.length) {
           return false;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCharFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCharFilter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCharFilter.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestCharFilter.java Mon Nov  9 04:01:50 2009
@@ -49,6 +49,7 @@
       super(in);
     }
 
+    @Override
     protected int correct(int currentOff) {
       return currentOff + 1;
     }
@@ -60,6 +61,7 @@
       super(in);
     }
 
+    @Override
     protected int correct(int currentOff) {
       return currentOff + 2;
     }

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  9 04:01:50 2009
@@ -1,3 +1,3 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:748824
-/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:829134,829881
-/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:824912-825292,826213-830804
+/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:829134,829881,831036
+/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:824912-825292,826213-833960

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestKeywordAnalyzer.java Mon Nov  9 04:01:50 2009
@@ -38,6 +38,7 @@
   private RAMDirectory directory;
   private IndexSearcher searcher;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     directory = new RAMDirectory();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestMappingCharFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestMappingCharFilter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestMappingCharFilter.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestMappingCharFilter.java Mon Nov  9 04:01:50 2009
@@ -24,6 +24,7 @@
 
   NormalizeCharMap normMap;
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     normMap = new NormalizeCharMap();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestStopAnalyzer.java Mon Nov  9 04:01:50 2009
@@ -36,6 +36,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestTeeSinkTokenFilter.java Mon Nov  9 04:01:50 2009
@@ -43,6 +43,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     tokens1 = new String[]{"The", "quick", "Burgundy", "Fox", "jumped", "over", "the", "lazy", "Red", "Dogs"};
@@ -59,6 +60,7 @@
   }
 
   static final TeeSinkTokenFilter.SinkFilter theFilter = new TeeSinkTokenFilter.SinkFilter() {
+    @Override
     public boolean accept(AttributeSource a) {
       TermAttribute termAtt = a.getAttribute(TermAttribute.class);
       return termAtt.term().equalsIgnoreCase("The");
@@ -66,6 +68,7 @@
   };
 
   static final TeeSinkTokenFilter.SinkFilter dogFilter = new TeeSinkTokenFilter.SinkFilter() {
+    @Override
     public boolean accept(AttributeSource a) {
       TermAttribute termAtt = a.getAttribute(TermAttribute.class);
       return termAtt.term().equalsIgnoreCase("Dogs");
@@ -236,6 +239,7 @@
     int count = 0;
 
     //return every 100 tokens
+    @Override
     public boolean incrementToken() throws IOException {
       boolean hasNext;
       for (hasNext = input.incrementToken();
@@ -256,6 +260,7 @@
       modCount = mc;
     }
 
+    @Override
     public boolean accept(AttributeSource a) {
       boolean b = (a != null && count % modCount == 0);
       count++;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestToken.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestToken.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestToken.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestToken.java Mon Nov  9 04:01:50 2009
@@ -224,9 +224,13 @@
   public interface SenselessAttribute extends Attribute {}
   
   public static final class SenselessAttributeImpl extends AttributeImpl implements SenselessAttribute {
+    @Override
     public void copyTo(AttributeImpl target) {}
+    @Override
     public void clear() {}
+    @Override
     public boolean equals(Object o) { return (o instanceof SenselessAttributeImpl); }
+    @Override
     public int hashCode() { return 0; }
   }
 

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  9 04:01:50 2009
@@ -1,3 +1,3 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestDateTools.java:748824
-/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestDateTools.java:829134,829881
-/lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:824912-825292,826213-830804
+/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestDateTools.java:829134,829881,831036
+/lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:824912-825292,826213-833960

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestNumberTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  9 04:01:50 2009
@@ -1,3 +1,3 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestNumberTools.java:748824
-/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestNumberTools.java:829134,829881
-/lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:824912-825292,826213-830804
+/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestNumberTools.java:829134,829881,831036
+/lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:824912-825292,826213-833960

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/MockIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/MockIndexInput.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/MockIndexInput.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/MockIndexInput.java Mon Nov  9 04:01:50 2009
@@ -29,6 +29,7 @@
         length = bytes.length;
     }
 
+    @Override
     protected void readInternal(byte[] dest, int destOffset, int len) {
         int remainder = len;
         int start = pointer;
@@ -45,14 +46,17 @@
         pointer += len;
     }
 
+    @Override
     public void close() {
         // ignore
     }
 
+    @Override
     protected void seekInternal(long pos) {
         pointer = (int) pos;
     }
 
+    @Override
     public long length() {
       return length;
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestAtomicUpdate.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestAtomicUpdate.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestAtomicUpdate.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestAtomicUpdate.java Mon Nov  9 04:01:50 2009
@@ -41,6 +41,7 @@
       super(dir, a, create, mfl);
     }
 
+    @Override
     boolean testPoint(String name) {
       //      if (name.equals("startCommit")) {
       if (RANDOM.nextInt(4) == 2)
@@ -61,6 +62,7 @@
       this.allThreads = threads;
     }
 
+    @Override
     public void run() {
       final long stopTime = System.currentTimeMillis() + 1000*RUN_TIME_SEC;
 
@@ -95,6 +97,7 @@
       this.writer = writer;
     }
 
+    @Override
     public void doWork() throws Exception {
       // Update all 100 docs...
       for(int i=0; i<100; i++) {
@@ -114,6 +117,7 @@
       this.directory = directory;
     }
 
+    @Override
     public void doWork() throws Throwable {
       IndexReader r = IndexReader.open(directory, true);
       assertEquals(100, r.numDocs());

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov  9 04:01:50 2009
@@ -1,3 +1,3 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:748824
-/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:829134,829881
-/lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:824912-825292,826213-830804
+/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:829134,829881,831036
+/lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:824912-825292,826213-833960

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestByteSlices.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestByteSlices.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestByteSlices.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestByteSlices.java Mon Nov  9 04:01:50 2009
@@ -24,6 +24,7 @@
     ArrayList freeByteBlocks = new ArrayList();
     
     /* Allocate another byte[] from the shared pool */
+    @Override
     synchronized byte[] getByteBlock(boolean trackAllocations) {
       final int size = freeByteBlocks.size();
       final byte[] b;
@@ -35,6 +36,7 @@
     }
 
     /* Return a byte[] to the pool */
+    @Override
     synchronized void recycleByteBlocks(byte[][] blocks, int start, int end) {
       for(int i=start;i<end;i++)
         freeByteBlocks.add(blocks[i]);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestCompoundFile.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestCompoundFile.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestCompoundFile.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestCompoundFile.java Mon Nov  9 04:01:50 2009
@@ -54,6 +54,7 @@
     private Directory dir;
 
 
+    @Override
     public void setUp() throws Exception {
        super.setUp();
        File file = new File(System.getProperty("tempDir"), "testIndex");
@@ -62,6 +63,7 @@
        dir = new SimpleFSDirectory(file,null);
     }
 
+    @Override
     public void tearDown() throws Exception {
        dir.close();
        super.tearDown();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestConcurrentMergeScheduler.java Mon Nov  9 04:01:50 2009
@@ -36,14 +36,17 @@
     boolean doFail;
     boolean hitExc;
 
+    @Override
     public void setDoFail() {
       this.doFail = true;
       hitExc = false;
     }
+    @Override
     public void clearDoFail() {
       this.doFail = false;
     }
 
+    @Override
     public void eval(MockRAMDirectory dir)  throws IOException {
       if (doFail && Thread.currentThread().getName().equals("main")) {
         StackTraceElement[] trace = new Exception().getStackTrace();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDirectoryReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDirectoryReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDirectoryReader.java Mon Nov  9 04:01:50 2009
@@ -39,6 +39,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     dir = new RAMDirectory();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDoc.java Mon Nov  9 04:01:50 2009
@@ -54,6 +54,7 @@
     /** Set the test case. This test case needs
      *  a few text files created in the current working directory.
      */
+    @Override
     public void setUp() throws Exception {
         super.setUp();
         workDir = new File(System.getProperty("tempDir"),"TestDoc");

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestDocumentWriter.java Mon Nov  9 04:01:50 2009
@@ -48,6 +48,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     dir = new RAMDirectory();
@@ -107,10 +108,12 @@
 
   public void testPositionIncrementGap() throws IOException {
     Analyzer analyzer = new Analyzer() {
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new WhitespaceTokenizer(reader);
       }
 
+      @Override
       public int getPositionIncrementGap(String fieldName) {
         return 500;
       }
@@ -138,11 +141,13 @@
 
   public void testTokenReuse() throws IOException {
     Analyzer analyzer = new Analyzer() {
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new TokenFilter(new WhitespaceTokenizer(reader)) {
           boolean first=true;
           AttributeSource.State state;
 
+          @Override
           public boolean incrementToken() throws IOException {
             if (state != null) {
               restoreState(state);
@@ -211,6 +216,7 @@
       
       private TermAttribute termAtt = addAttribute(TermAttribute.class);
       
+      @Override
       public boolean incrementToken() throws IOException {
         if (index == tokens.length) {
           return false;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFieldInfos.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFieldInfos.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFieldInfos.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFieldInfos.java Mon Nov  9 04:01:50 2009
@@ -34,6 +34,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     DocHelper.setupDoc(testDoc);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFieldsReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFieldsReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFieldsReader.java Mon Nov  9 04:01:50 2009
@@ -44,6 +44,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     fieldInfos = new FieldInfos();
@@ -307,30 +308,39 @@
       fsDir = FSDirectory.open(dir);
       lockFactory = fsDir.getLockFactory();
     }
+    @Override
     public IndexInput openInput(String name) throws IOException {
       return new FaultyIndexInput(fsDir.openInput(name));
     }
+    @Override
     public String[] listAll() throws IOException {
       return fsDir.listAll();
     }
+    @Override
     public boolean fileExists(String name) throws IOException {
       return fsDir.fileExists(name);
     }
+    @Override
     public long fileModified(String name) throws IOException {
       return fsDir.fileModified(name);
     }
+    @Override
     public void touchFile(String name) throws IOException {
       fsDir.touchFile(name);
     }
+    @Override
     public void deleteFile(String name) throws IOException {
       fsDir.deleteFile(name);
     }
+    @Override
     public long fileLength(String name) throws IOException {
       return fsDir.fileLength(name);
     }
+    @Override
     public IndexOutput createOutput(String name) throws IOException {
       return fsDir.createOutput(name);
     }
+    @Override
     public void close() throws IOException {
       fsDir.close();
     }
@@ -348,20 +358,25 @@
         throw new IOException("Simulated network outage");
       }
     }
+    @Override
     public void readInternal(byte[] b, int offset, int length) throws IOException {
       simOutage();
       delegate.readBytes(b, offset, length);
     }
+    @Override
     public void seekInternal(long pos) throws IOException {
       //simOutage();
       delegate.seek(pos);
     }
+    @Override
     public long length() {
       return delegate.length();
     }
+    @Override
     public void close() throws IOException {
       delegate.close();
     }
+    @Override
     public Object clone() {
       return new FaultyIndexInput((IndexInput) delegate.clone());
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFilterIndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFilterIndexReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFilterIndexReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestFilterIndexReader.java Mon Nov  9 04:01:50 2009
@@ -41,6 +41,7 @@
       }
 
       /** Scan for terms containing the letter 'e'.*/
+      @Override
       public boolean next() throws IOException {
         while (in.next()) {
           if (in.term().text().indexOf('e') != -1)
@@ -57,6 +58,7 @@
       }
 
       /** Scan for odd numbered documents. */
+      @Override
       public boolean next() throws IOException {
         while (in.next()) {
           if ((in.doc() % 2) == 1)
@@ -71,11 +73,13 @@
     }
 
     /** Filter terms with TestTermEnum. */
+    @Override
     public TermEnum terms() throws IOException {
       return new TestTermEnum(in.terms());
     }
 
     /** Filter positions with TestTermPositions. */
+    @Override
     public TermPositions termPositions() throws IOException {
       return new TestTermPositions(in.termPositions());
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderCloneNorms.java Mon Nov  9 04:01:50 2009
@@ -41,6 +41,7 @@
 public class TestIndexReaderCloneNorms extends LuceneTestCase {
 
   private class SimilarityOne extends DefaultSimilarity {
+    @Override
     public float lengthNorm(String fieldName, int numTerms) {
       return 1;
     }
@@ -66,6 +67,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     similarityOne = new SimilarityOne();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexReaderReopen.java Mon Nov  9 04:01:50 2009
@@ -57,10 +57,12 @@
     createIndex(dir1, false);
     performDefaultTests(new TestReopen() {
 
+      @Override
       protected void modifyIndex(int i) throws IOException {
         TestIndexReaderReopen.modifyIndex(i, dir1);
       }
 
+      @Override
       protected IndexReader openReader() throws IOException {
         return IndexReader.open(dir1, false);
       }
@@ -73,10 +75,12 @@
     createIndex(dir2, true);
     performDefaultTests(new TestReopen() {
 
+      @Override
       protected void modifyIndex(int i) throws IOException {
         TestIndexReaderReopen.modifyIndex(i, dir2);
       }
 
+      @Override
       protected IndexReader openReader() throws IOException {
         return IndexReader.open(dir2, false);
       }
@@ -93,11 +97,13 @@
     
     performDefaultTests(new TestReopen() {
 
+      @Override
       protected void modifyIndex(int i) throws IOException {
         TestIndexReaderReopen.modifyIndex(i, dir1);
         TestIndexReaderReopen.modifyIndex(i, dir2);
       }
 
+      @Override
       protected IndexReader openReader() throws IOException {
         ParallelReader pr = new ParallelReader();
         pr.add(IndexReader.open(dir1, false));
@@ -116,11 +122,13 @@
 
     performTestsWithExceptionInReopen(new TestReopen() {
 
+      @Override
       protected void modifyIndex(int i) throws IOException {
         TestIndexReaderReopen.modifyIndex(i, dir3);
         TestIndexReaderReopen.modifyIndex(i, dir4);
       }
 
+      @Override
       protected IndexReader openReader() throws IOException {
         ParallelReader pr = new ParallelReader();
         pr.add(IndexReader.open(dir3, false));
@@ -213,11 +221,13 @@
 
     performDefaultTests(new TestReopen() {
 
+      @Override
       protected void modifyIndex(int i) throws IOException {
         TestIndexReaderReopen.modifyIndex(i, dir1);
         TestIndexReaderReopen.modifyIndex(i, dir2);
       }
 
+      @Override
       protected IndexReader openReader() throws IOException {
         return new MultiReader(new IndexReader[] 
                         {IndexReader.open(dir1, false), 
@@ -237,11 +247,13 @@
 
     performTestsWithExceptionInReopen(new TestReopen() {
 
+      @Override
       protected void modifyIndex(int i) throws IOException {
         TestIndexReaderReopen.modifyIndex(i, dir3);
         TestIndexReaderReopen.modifyIndex(i, dir4);
       }
 
+      @Override
       protected IndexReader openReader() throws IOException {
         return new MultiReader(new IndexReader[] 
                         {IndexReader.open(dir3, false), 
@@ -270,6 +282,7 @@
     
     performDefaultTests(new TestReopen() {
 
+      @Override
       protected void modifyIndex(int i) throws IOException {
         // only change norms in this index to maintain the same number of docs for each of ParallelReader's subreaders
         if (i == 1) TestIndexReaderReopen.modifyIndex(i, dir1);  
@@ -278,6 +291,7 @@
         TestIndexReaderReopen.modifyIndex(i, dir5);
       }
 
+      @Override
       protected IndexReader openReader() throws IOException {
         ParallelReader pr = new ParallelReader();
         pr.add(IndexReader.open(dir1, false));
@@ -695,6 +709,7 @@
     writer.close();
 
     final TestReopen test = new TestReopen() {      
+      @Override
       protected void modifyIndex(int i) throws IOException {
         if (i % 3 == 0) {
           IndexReader modifier = IndexReader.open(dir, false);
@@ -711,6 +726,7 @@
         }
       }
 
+      @Override
       protected IndexReader openReader() throws IOException {
         return IndexReader.open(dir, false);
       }      
@@ -741,6 +757,7 @@
       if (i < 20 ||( i >=50 && i < 70) || i > 90) {
         task = new ReaderThreadTask() {
           
+          @Override
           public void run() throws Exception {
             while (!stopped) {
               if (index % 2 == 0) {
@@ -784,6 +801,7 @@
         };
       } else {
         task = new ReaderThreadTask() {
+          @Override
           public void run() throws Exception {
             while (!stopped) {
               int numReaders = readers.size();
@@ -878,6 +896,7 @@
       this.task.stop();
     }
     
+    @Override
     public void run() {
       try {
         this.task.run();
@@ -1073,6 +1092,7 @@
   }
 
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     String tempDir = System.getProperty("java.io.tmpdir");

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriter.java Mon Nov  9 04:01:50 2009
@@ -29,7 +29,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.HashSet;
 import java.util.Random;
 
 import org.apache.lucene.util.LuceneTestCase;
@@ -1453,6 +1452,7 @@
           lockFactory = null;
           myLockFactory = new SingleInstanceLockFactory();
         }
+        @Override
         public Lock makeLock(String name) {
           return myLockFactory.makeLock(name);
         }
@@ -1660,6 +1660,7 @@
   // Just intercepts all merges & verifies that we are never
   // merging a segment with >= 20 (maxMergeDocs) docs
   private class MyMergeScheduler extends MergeScheduler {
+    @Override
     synchronized public void merge(IndexWriter writer)
       throws CorruptIndexException, IOException {
 
@@ -1673,6 +1674,7 @@
       }
     }
 
+    @Override
     public void close() {}
   }
 
@@ -1697,10 +1699,12 @@
     RAMDirectory dir = new MockRAMDirectory();
     IndexWriter writer = new IndexWriter(dir, new Analyzer() {
 
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new TokenFilter(new StandardTokenizer(Version.LUCENE_CURRENT, reader)) {
           private int count = 0;
 
+          @Override
           public boolean incrementToken() throws IOException {
             if (count++ == 5) {
               throw new IOException();
@@ -1757,13 +1761,16 @@
     boolean doFail = false;
     int count;
 
+    @Override
     public void setDoFail() {
       this.doFail = true;
     }
+    @Override
     public void clearDoFail() {
       this.doFail = false;
     }
 
+    @Override
     public void eval(MockRAMDirectory dir)  throws IOException {
       if (doFail) {
         StackTraceElement[] trace = new Exception().getStackTrace();
@@ -1824,12 +1831,14 @@
       this.fieldName = fieldName;
     }
 
+    @Override
     public boolean incrementToken() throws IOException {
       if (this.fieldName.equals("crash") && count++ >= 4)
         throw new IOException("I'm experiencing problems");
       return input.incrementToken();
     }
 
+    @Override
     public void reset() throws IOException {
       super.reset();
       count = 0;
@@ -1838,6 +1847,7 @@
 
   public void testDocumentsWriterExceptions() throws IOException {
     Analyzer analyzer = new Analyzer() {
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new CrashingFilter(fieldName, new WhitespaceTokenizer(reader));
       }
@@ -1920,6 +1930,7 @@
 
   public void testDocumentsWriterExceptionThreads() throws Exception {
     Analyzer analyzer = new Analyzer() {
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new CrashingFilter(fieldName, new WhitespaceTokenizer(reader));
       }
@@ -1939,6 +1950,7 @@
         Thread[] threads = new Thread[NUM_THREAD];
         for(int t=0;t<NUM_THREAD;t++) {
           threads[t] = new Thread() {
+              @Override
               public void run() {
                 try {
                   for(int iter=0;iter<NUM_ITER;iter++) {
@@ -2120,6 +2132,7 @@
         final IndexWriter finalWriter = writer;
         final ArrayList failure = new ArrayList();
         Thread t1 = new Thread() {
+            @Override
             public void run() {
               boolean done = false;
               while(!done) {
@@ -2181,6 +2194,7 @@
       this.noErrors = noErrors;
     }
 
+    @Override
     public void run() {
 
       final Document doc = new Document();
@@ -2368,6 +2382,7 @@
     public FailOnlyOnAbortOrFlush(boolean onlyOnce) {
       this.onlyOnce = onlyOnce;
     }
+    @Override
     public void eval(MockRAMDirectory dir)  throws IOException {
       if (doFail) {
         StackTraceElement[] trace = new Exception().getStackTrace();
@@ -2500,6 +2515,7 @@
     public FailOnlyInCloseDocStore(boolean onlyOnce) {
       this.onlyOnce = onlyOnce;
     }
+    @Override
     public void eval(MockRAMDirectory dir)  throws IOException {
       if (doFail) {
         StackTraceElement[] trace = new Exception().getStackTrace();
@@ -2540,6 +2556,7 @@
     public FailOnlyInWriteSegment(boolean onlyOnce) {
       this.onlyOnce = onlyOnce;
     }
+    @Override
     public void eval(MockRAMDirectory dir)  throws IOException {
       if (doFail) {
         StackTraceElement[] trace = new Exception().getStackTrace();
@@ -2672,6 +2689,7 @@
   // Throws IOException during MockRAMDirectory.sync
   private static class FailOnlyInSync extends MockRAMDirectory.Failure {
     boolean didFail;
+    @Override
     public void eval(MockRAMDirectory dir)  throws IOException {
       if (doFail) {
         StackTraceElement[] trace = new Exception().getStackTrace();
@@ -3040,6 +3058,7 @@
 
     boolean doFail;
 
+    @Override
     boolean testPoint(String name) {
       if (doFail && name.equals("DocumentsWriter.ThreadState.init start"))
         throw new RuntimeException("intentionally failing");
@@ -3077,6 +3096,7 @@
     w.addDocument(doc);
 
     Analyzer analyzer = new Analyzer() {
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new CrashingFilter(fieldName, new WhitespaceTokenizer(reader));
       }
@@ -3105,6 +3125,7 @@
     boolean doFail;
     boolean failed;
 
+    @Override
     boolean testPoint(String name) {
       if (doFail && name.equals("startMergeInit")) {
         failed = true;
@@ -3146,6 +3167,7 @@
 
     boolean wasCalled;
 
+    @Override
     public void doAfterFlush() {
       wasCalled = true;
     }
@@ -3179,6 +3201,7 @@
 
     boolean fail1, fail2;
 
+    @Override
     public void eval(MockRAMDirectory dir)  throws IOException {
       StackTraceElement[] trace = new Exception().getStackTrace();
       boolean isCommit = false;
@@ -3455,6 +3478,7 @@
       final Iterator tokens = Arrays.asList(new String[]{"a","b","c"}).iterator();
       boolean first = true;
       
+      @Override
       public boolean incrementToken() {
         if (!tokens.hasNext()) return false;
         clearAttributes();
@@ -3650,6 +3674,7 @@
 
       for(int i=0;i<NUM_THREADS;i++) {
         threads[i] = new Thread() {
+            @Override
             public void run() {
               try {
 
@@ -3701,6 +3726,7 @@
       super(numCopy);
     }
 
+    @Override
     void handle(Throwable t) {
       t.printStackTrace(System.out);
       synchronized(failures) {
@@ -3708,6 +3734,7 @@
       }
     }
 
+    @Override
     void doBody(int j, Directory[] dirs) throws Throwable {
       switch(j%4) {
       case 0:
@@ -3760,6 +3787,7 @@
       super(numCopy);
     }
 
+    @Override
     void handle(Throwable t) {
       if (!(t instanceof AlreadyClosedException) && !(t instanceof NullPointerException)) {
         t.printStackTrace(System.out);
@@ -3795,6 +3823,7 @@
       super(numCopy);
     }
 
+    @Override
     void doBody(int j, Directory[] dirs) throws Throwable {
       switch(j%5) {
       case 0:
@@ -3814,6 +3843,7 @@
       }
     }
 
+    @Override
     void handle(Throwable t) {
       boolean report = true;
 
@@ -3886,6 +3916,7 @@
 
     boolean doFail;
 
+    @Override
     boolean testPoint(String name) {
       if (doFail && name.equals("rollback before checkpoint"))
         throw new RuntimeException("intentionally failing");
@@ -4013,6 +4044,7 @@
     final List thrown = new ArrayList();
 
     final IndexWriter writer = new IndexWriter(new MockRAMDirectory(), new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT), IndexWriter.MaxFieldLength.UNLIMITED) {
+        @Override
         public void message(final String message) {
           if (message.startsWith("now flush at close") && 0 == thrown.size()) {
             thrown.add(null);
@@ -4333,6 +4365,7 @@
   private class IndexerThreadInterrupt extends Thread {
     volatile boolean failed;
     volatile boolean finish;
+    @Override
     public void run() {
       RAMDirectory dir = new RAMDirectory();
       IndexWriter w = null;
@@ -4521,4 +4554,33 @@
     w.close();
     d.close();
   }
+
+  public void testEmbeddedFFFF() throws Throwable {
+
+    Directory d = new MockRAMDirectory();
+    IndexWriter w = new IndexWriter(d, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED);
+    Document doc = new Document();
+    doc.add(new Field("field", "a a\uffffb", Field.Store.NO, Field.Index.ANALYZED));
+    w.addDocument(doc);
+    doc = new Document();
+    doc.add(new Field("field", "a", Field.Store.NO, Field.Index.ANALYZED));
+    w.addDocument(doc);
+    w.close();
+
+    _TestUtil.checkIndex(d);
+    d.close();
+  }
+
+  public void testNoDocsIndex() throws Throwable {
+    Directory dir = new MockRAMDirectory();
+    IndexWriter writer = new IndexWriter(dir, new SimpleAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED);
+    writer.setUseCompoundFile(false);
+    ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
+    writer.setInfoStream(new PrintStream(bos));
+    writer.addDocument(new Document());
+    writer.close();
+
+    _TestUtil.checkIndex(dir);
+    dir.close();
+  }
 }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterDelete.java Mon Nov  9 04:01:50 2009
@@ -608,11 +608,13 @@
     MockRAMDirectory.Failure failure = new MockRAMDirectory.Failure() {
         boolean sawMaybe = false;
         boolean failed = false;
+        @Override
         public MockRAMDirectory.Failure reset() {
           sawMaybe = false;
           failed = false;
           return this;
         }
+        @Override
         public void eval(MockRAMDirectory dir)  throws IOException {
           if (sawMaybe && !failed) {
             boolean seen = false;
@@ -736,10 +738,12 @@
     
     MockRAMDirectory.Failure failure = new MockRAMDirectory.Failure() {
         boolean failed = false;
+        @Override
         public MockRAMDirectory.Failure reset() {
           failed = false;
           return this;
         }
+        @Override
         public void eval(MockRAMDirectory dir)  throws IOException {
           if (!failed) {
             failed = true;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java Mon Nov  9 04:01:50 2009
@@ -45,6 +45,7 @@
       this.writer = writer;
     }
 
+    @Override
     public void run() {
 
       final Document doc = new Document();
@@ -117,6 +118,7 @@
       super(dir, a, create, mfl);
     }
 
+    @Override
     boolean testPoint(String name) {
       if (doFail.get() != null && !name.equals("startDoFlush") && r.nextInt(20) == 17) {
         if (DEBUG) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterLockRelease.java Mon Nov  9 04:01:50 2009
@@ -35,6 +35,7 @@
 public class TestIndexWriterLockRelease extends LuceneTestCase {
     private java.io.File __test_dir;
 
+    @Override
     public void setUp() throws Exception {
         super.setUp();
         if (this.__test_dir == null) {
@@ -52,6 +53,7 @@
         }
     }
 
+    @Override
     public void tearDown() throws Exception {
         super.tearDown();
         if (this.__test_dir != null) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestIndexWriterReader.java Mon Nov  9 04:01:50 2009
@@ -303,6 +303,7 @@
     void launchThreads(final int numIter) {
       for (int i = 0; i < NUM_THREADS; i++) {
         threads[i] = new Thread() {
+          @Override
           public void run() {
             try {
               Term term = getDeleteTerm();
@@ -397,6 +398,7 @@
     void launchThreads(final int numIter) {
       for (int i = 0; i < NUM_THREADS; i++) {
         threads[i] = new Thread() {
+          @Override
           public void run() {
             try {
               final Directory[] dirs = new Directory[numDirs];
@@ -564,6 +566,7 @@
 
   private static class MyWarmer extends IndexWriter.IndexReaderWarmer {
     int warmCount;
+    @Override
     public void warm(IndexReader reader) throws IOException {
       warmCount++;
     }
@@ -695,6 +698,7 @@
     final Thread[] threads = new Thread[NUM_THREAD];
     for(int i=0;i<NUM_THREAD;i++) {
       threads[i] = new Thread() {
+          @Override
           public void run() {
             while(System.currentTimeMillis() < endTime) {
               try {
@@ -758,6 +762,7 @@
     final Thread[] threads = new Thread[NUM_THREAD];
     for(int i=0;i<NUM_THREAD;i++) {
       threads[i] = new Thread() {
+          @Override
           public void run() {
             int count = 0;
             final Random r = new Random();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestLazyProxSkipping.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestLazyProxSkipping.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestLazyProxSkipping.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestLazyProxSkipping.java Mon Nov  9 04:01:50 2009
@@ -45,6 +45,7 @@
     private String term3 = "zz";
 
     private class SeekCountingDirectory extends RAMDirectory {
+      @Override
       public IndexInput openInput(String name) throws IOException {
         IndexInput ii = super.openInput(name);
         if (name.endsWith(".prx") || name.endsWith(".pos") ) {
@@ -155,31 +156,38 @@
               this.input = input;
           }      
                 
+          @Override
           public byte readByte() throws IOException {
               return this.input.readByte();
           }
     
+          @Override
           public void readBytes(byte[] b, int offset, int len) throws IOException {
               this.input.readBytes(b, offset, len);        
           }
     
+          @Override
           public void close() throws IOException {
               this.input.close();
           }
     
+          @Override
           public long getFilePointer() {
               return this.input.getFilePointer();
           }
     
+          @Override
           public void seek(long pos) throws IOException {
               TestLazyProxSkipping.this.seeksCounter++;
               this.input.seek(pos);
           }
     
+          @Override
           public long length() {
               return this.input.length();
           }
           
+          @Override
           public Object clone() {
               return new SeeksCountingStream((IndexInput) this.input.clone());
           }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java Mon Nov  9 04:01:50 2009
@@ -99,6 +99,7 @@
   }
 
   private static class PayloadAnalyzer extends Analyzer {
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       return new PayloadFilter(new LowerCaseTokenizer(reader));
     }
@@ -115,6 +116,7 @@
       payloadAtt = addAttribute(PayloadAttribute.class);
     }
 
+    @Override
     public boolean incrementToken() throws IOException {
       boolean hasNext = input.incrementToken();
       if (hasNext) {
@@ -136,32 +138,39 @@
       this.input = input;
     }
 
+    @Override
     public byte readByte() throws IOException {
       TestMultiLevelSkipList.this.counter++;
       return this.input.readByte();
     }
 
+    @Override
     public void readBytes(byte[] b, int offset, int len) throws IOException {
       TestMultiLevelSkipList.this.counter += len;
       this.input.readBytes(b, offset, len);
     }
 
+    @Override
     public void close() throws IOException {
       this.input.close();
     }
 
+    @Override
     public long getFilePointer() {
       return this.input.getFilePointer();
     }
 
+    @Override
     public void seek(long pos) throws IOException {
       this.input.seek(pos);
     }
 
+    @Override
     public long length() {
       return this.input.length();
     }
 
+    @Override
     public Object clone() {
       return new CountingStream((IndexInput) this.input.clone());
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestMultiReader.java Mon Nov  9 04:01:50 2009
@@ -24,6 +24,7 @@
     super(s);
   }
 
+  @Override
   protected IndexReader openReader() throws IOException {
     IndexReader reader;
 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java Mon Nov  9 04:01:50 2009
@@ -80,6 +80,7 @@
       this.writer = writer;
     }
 
+    @Override
     public void run() {
       try {
         while (run) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNorms.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNorms.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNorms.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestNorms.java Mon Nov  9 04:01:50 2009
@@ -42,6 +42,7 @@
 public class TestNorms extends LuceneTestCase {
 
   private class SimilarityOne extends DefaultSimilarity {
+    @Override
     public float lengthNorm(String fieldName, int numTerms) {
       return 1;
     }
@@ -61,6 +62,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     similarityOne = new SimilarityOne();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestOmitTf.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestOmitTf.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestOmitTf.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestOmitTf.java Mon Nov  9 04:01:50 2009
@@ -292,9 +292,11 @@
     searcher.search(q1,
                     new CountingHitCollector() {
                       private Scorer scorer;
+                      @Override
                       public final void setScorer(Scorer scorer) {
                         this.scorer = scorer;
                       }
+                      @Override
                       public final void collect(int doc) throws IOException {
                         //System.out.println("Q1: Doc=" + doc + " score=" + score);
                         float score = scorer.score();
@@ -308,9 +310,11 @@
     searcher.search(q2,
                     new CountingHitCollector() {
                       private Scorer scorer;
+                      @Override
                       public final void setScorer(Scorer scorer) {
                         this.scorer = scorer;
                       }
+                      @Override
                       public final void collect(int doc) throws IOException {
                         //System.out.println("Q2: Doc=" + doc + " score=" + score);
                         float score = scorer.score();
@@ -327,9 +331,11 @@
     searcher.search(q3,
                     new CountingHitCollector() {
                       private Scorer scorer;
+                      @Override
                       public final void setScorer(Scorer scorer) {
                         this.scorer = scorer;
                       }
+                      @Override
                       public final void collect(int doc) throws IOException {
                         //System.out.println("Q1: Doc=" + doc + " score=" + score);
                         float score = scorer.score();
@@ -344,9 +350,11 @@
     searcher.search(q4,
                     new CountingHitCollector() {
                       private Scorer scorer;
+                      @Override
                       public final void setScorer(Scorer scorer) {
                         this.scorer = scorer;
                       }
+                      @Override
                       public final void collect(int doc) throws IOException {
                         float score = scorer.score();
                         //System.out.println("Q1: Doc=" + doc + " score=" + score);
@@ -365,6 +373,7 @@
         
     searcher.search(bq,
                     new CountingHitCollector() {
+                      @Override
                       public final void collect(int doc) throws IOException {
                         //System.out.println("BQ: Doc=" + doc + " score=" + score);
                         super.collect(doc);
@@ -381,7 +390,9 @@
     static int sum=0;
     private int docBase = -1;
     CountingHitCollector(){count=0;sum=0;}
+    @Override
     public void setScorer(Scorer scorer) throws IOException {}
+    @Override
     public void collect(int doc) throws IOException {
       count++;
       sum += doc + docBase;  // use it to avoid any possibility of being optimized away
@@ -390,9 +401,11 @@
     public static int getCount() { return count; }
     public static int getSum() { return sum; }
     
+    @Override
     public void setNextReader(IndexReader reader, int docBase) {
       this.docBase = docBase;
     }
+    @Override
     public boolean acceptsDocsOutOfOrder() {
       return true;
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestParallelReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestParallelReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestParallelReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestParallelReader.java Mon Nov  9 04:01:50 2009
@@ -42,6 +42,7 @@
   private Searcher parallel;
   private Searcher single;
   
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     single = single();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestParallelTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestParallelTermEnum.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestParallelTermEnum.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestParallelTermEnum.java Mon Nov  9 04:01:50 2009
@@ -32,6 +32,7 @@
     private IndexReader ir1;
     private IndexReader ir2;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         Document doc;
@@ -65,6 +66,7 @@
         this.ir2 = IndexReader.open(rd2, true);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
 

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPayloads.java Mon Nov  9 04:01:50 2009
@@ -398,6 +398,7 @@
             fieldToData.put(field, new PayloadData(numFieldInstancesToSkip, data, offset, length));
         }
         
+        @Override
         public TokenStream tokenStream(String fieldName, Reader reader) {
             PayloadData payload = (PayloadData) fieldToData.get(fieldName);
             TokenStream ts = new WhitespaceTokenizer(reader);
@@ -445,6 +446,7 @@
             payloadAtt = addAttribute(PayloadAttribute.class);
         }
         
+        @Override
         public boolean incrementToken() throws IOException {
             boolean hasNext = input.incrementToken();
             if (hasNext) {
@@ -478,6 +480,7 @@
         Thread[] ingesters = new Thread[numThreads];
         for (int i = 0; i < numThreads; i++) {
             ingesters[i] = new Thread() {
+                @Override
                 public void run() {
                     try {
                         for (int j = 0; j < numDocs; j++) {
@@ -536,6 +539,7 @@
             termAtt = addAttribute(TermAttribute.class);
         }
         
+        @Override
         public boolean incrementToken() throws IOException {
             if (!first) return false;
             first = false;
@@ -544,6 +548,7 @@
             return true;
         }
         
+        @Override
         public void close() throws IOException {
             pool.release(payload);
         }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPositionBasedTermVectorMapper.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPositionBasedTermVectorMapper.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPositionBasedTermVectorMapper.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestPositionBasedTermVectorMapper.java Mon Nov  9 04:01:50 2009
@@ -33,6 +33,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     tokens = new String[]{"here", "is", "some", "text", "to", "test", "extra"};

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentMerger.java Mon Nov  9 04:01:50 2009
@@ -44,6 +44,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     DocHelper.setupDoc(doc1);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentReader.java Mon Nov  9 04:01:50 2009
@@ -39,6 +39,7 @@
   }
   
   //TODO: Setup the reader w/ multiple documents
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     DocHelper.setupDoc(testDoc);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentTermDocs.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentTermDocs.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentTermDocs.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestSegmentTermDocs.java Mon Nov  9 04:01:50 2009
@@ -36,6 +36,7 @@
     super(s);
   }
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     DocHelper.setupDoc(testDoc);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing.java Mon Nov  9 04:01:50 2009
@@ -42,6 +42,7 @@
       this.allThreads = threads;
     }
 
+    @Override
     public void run() {
       final long stopTime = System.currentTimeMillis() + 1000*RUN_TIME_SEC;
 
@@ -77,6 +78,7 @@
       this.writer = writer;
     }
 
+    @Override
     public void doWork() throws Exception {
       // Add 10 docs:
       for(int j=0; j<10; j++) {
@@ -104,6 +106,7 @@
       this.directory = directory;
     }
 
+    @Override
     public void doWork() throws Throwable {
       for (int i=0; i<100; i++)
         (new IndexSearcher(directory, true)).close();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing2.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing2.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing2.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestStressIndexing2.java Mon Nov  9 04:01:50 2009
@@ -44,6 +44,7 @@
       super(dir, a, create, mfl);
     }
 
+    @Override
     boolean testPoint(String name) {
       //      if (name.equals("startCommit")) {
       if (r.nextInt(4) == 2)
@@ -640,6 +641,7 @@
       docs.remove(idString);
     }
 
+    @Override
     public void run() {
       try {
         r = new Random(base+range+seed);

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermVectorsReader.java Mon Nov  9 04:01:50 2009
@@ -63,6 +63,7 @@
 
   TestToken[] tokens = new TestToken[testTerms.length * TERM_FREQ];
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     /*
@@ -131,6 +132,7 @@
       offsetAtt = addAttribute(OffsetAttribute.class);
     }
     
+    @Override
     public boolean incrementToken() {
       if (tokenUpto >= tokens.length)
         return false;
@@ -149,6 +151,7 @@
   }
 
   private class MyAnalyzer extends Analyzer {
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       return new MyTokenStream();
     }
@@ -411,12 +414,14 @@
 
     private int documentNumber = -1;
 
+    @Override
     public void setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions) {
       if (documentNumber == -1) {
         throw new RuntimeException("Documentnumber should be set at this point!");
       }
     }
 
+    @Override
     public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) {
       if (documentNumber == -1) {
         throw new RuntimeException("Documentnumber should be set at this point!");
@@ -427,6 +432,7 @@
       return documentNumber;
     }
 
+    @Override
     public void setDocumentNumber(int documentNumber) {
       this.documentNumber = documentNumber;
     }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermdocPerf.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermdocPerf.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermdocPerf.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTermdocPerf.java Mon Nov  9 04:01:50 2009
@@ -44,6 +44,7 @@
      this.termAtt = addAttribute(TermAttribute.class);
    }
 
+   @Override
    public boolean incrementToken() throws IOException {
      num--;
      if (num >= 0) {
@@ -62,6 +63,7 @@
     final RepeatingTokenStream ts = new RepeatingTokenStream(val);
 
     Analyzer analyzer = new Analyzer() {
+      @Override
       public TokenStream tokenStream(String fieldName, Reader reader) {
         if (random.nextFloat() < percentDocs) ts.num = random.nextInt(maxTF)+1;
         else ts.num=0;

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestThreadedOptimize.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestThreadedOptimize.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestThreadedOptimize.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestThreadedOptimize.java Mon Nov  9 04:01:50 2009
@@ -79,6 +79,7 @@
         final int iFinal = i;
         final IndexWriter writerFinal = writer;
         threads[i] = new Thread() {
+          @Override
           public void run() {
             try {
               for(int j=0;j<NUM_ITER2;j++) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactionRollback.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactionRollback.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactionRollback.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactionRollback.java Mon Nov  9 04:01:50 2009
@@ -121,6 +121,7 @@
   }
   */
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     dir = new MockRAMDirectory();

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactions.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactions.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactions.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestTransactions.java Mon Nov  9 04:01:50 2009
@@ -30,6 +30,7 @@
   private static volatile boolean doFail;
 
   private class RandomFailure extends MockRAMDirectory.Failure {
+    @Override
     public void eval(MockRAMDirectory dir) throws IOException {
       if (TestTransactions.doFail && RANDOM.nextInt() % 10 <= 3)
         throw new IOException("now failing randomly but on purpose");
@@ -47,6 +48,7 @@
       this.allThreads = threads;
     }
 
+    @Override
     public void run() {
       final long stopTime = System.currentTimeMillis() + 1000*RUN_TIME_SEC;
 
@@ -81,6 +83,7 @@
       this.dir2 = dir2;
     }
 
+    @Override
     public void doWork() throws Throwable {
 
       IndexWriter writer1 = new IndexWriter(dir1, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
@@ -158,6 +161,7 @@
       this.dir2 = dir2;
     }
 
+    @Override
     public void doWork() throws Throwable {
       IndexReader r1, r2;
       synchronized(lock) {

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiAnalyzer.java Mon Nov  9 04:01:50 2009
@@ -134,6 +134,7 @@
     public MultiAnalyzer() {
     }
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new StandardTokenizer(Version.LUCENE_CURRENT, reader);
       result = new TestFilter(result);
@@ -161,6 +162,7 @@
       typeAtt = addAttribute(TypeAttribute.class);
     }
 
+    @Override
     public final boolean incrementToken() throws java.io.IOException {
       if (multiToken > 0) {
         termAtt.setTermBuffer("multi"+(multiToken+1));
@@ -200,6 +202,7 @@
     public PosIncrementAnalyzer() {
     }
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       TokenStream result = new StandardTokenizer(Version.LUCENE_CURRENT, reader);
       result = new TestPosIncrementFilter(result);
@@ -219,6 +222,7 @@
       posIncrAtt = addAttribute(PositionIncrementAttribute.class);
     }
 
+    @Override
     public final boolean incrementToken () throws java.io.IOException {
       while(input.incrementToken()) {
         if (termAtt.term().equals("the")) {
@@ -248,6 +252,7 @@
             return super.getFieldQuery(f,t);
         }
         /** wrap super's version */
+        @Override
         protected Query getFieldQuery(String f, String t)
             throws ParseException {
             return new DumbQueryWrapper(getSuperFieldQuery(f,t));
@@ -265,6 +270,7 @@
             super();
             this.q = q;
         }
+        @Override
         public String toString(String f) {
             return q.toString(f);
         }

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java?rev=833968&r1=833967&r2=833968&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java (original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/queryParser/TestMultiFieldQueryParser.java Mon Nov  9 04:01:50 2009
@@ -310,6 +310,7 @@
     public AnalyzerReturningNull() {
     }
 
+    @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
       if ("f1".equals(fieldName)) {
         return new EmptyTokenStream();
@@ -319,6 +320,7 @@
     }
 
     private static class EmptyTokenStream extends TokenStream {
+      @Override
       public boolean incrementToken() throws IOException {
         return false;
       }



Mime
View raw message