lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r917067 [6/8] - 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/bg/ contrib/analyzers/common/src/java/org/apache/l...
Date Sat, 27 Feb 2010 22:51:55 GMT
Modified: lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java (original)
+++ lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java Sat Feb 27 22:51:44 2010
@@ -18,7 +18,6 @@
  */
 
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.Version;
 import org.apache.lucene.util._TestUtil;
 import org.apache.lucene.analysis.SimpleAnalyzer;
 import org.apache.lucene.document.*;
@@ -59,7 +58,7 @@
   private static void startServer() throws Exception {
     // construct an index
     RAMDirectory indexStore = new RAMDirectory();
-    IndexWriter writer = new IndexWriter(indexStore,new SimpleAnalyzer(Version.LUCENE_CURRENT),true, IndexWriter.MaxFieldLength.LIMITED);
+    IndexWriter writer = new IndexWriter(indexStore,new SimpleAnalyzer(TEST_VERSION_CURRENT),true, IndexWriter.MaxFieldLength.LIMITED);
     Document doc = new Document();
     doc.add(new Field("test", "test text", Field.Store.YES, Field.Index.ANALYZED));
     doc.add(new Field("other", "other test text", Field.Store.YES, Field.Index.ANALYZED));
@@ -86,9 +85,9 @@
     assertTrue("document is null and it shouldn't be", document != null);
     assertEquals("test text", document.get("test"));
     assertTrue("document.getFields() Size: " + document.getFields().size() + " is not: " + 2, document.getFields().size() == 2);
-    Set ftl = new HashSet();
+    Set<String> ftl = new HashSet<String>();
     ftl.add("other");
-    FieldSelector fs = new SetBasedFieldSelector(ftl, Collections.EMPTY_SET);
+    FieldSelector fs = new SetBasedFieldSelector(ftl, Collections.<String>emptySet());
     document = searcher.doc(0, fs);
     assertTrue("document is null and it shouldn't be", document != null);
     assertTrue("document.getFields() Size: " + document.getFields().size() + " is not: " + 1, document.getFields().size() == 1);

Modified: lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java (original)
+++ lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java Sat Feb 27 22:51:44 2010
@@ -39,7 +39,6 @@
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.Version;
 import org.apache.lucene.util._TestUtil;
 
 /**
@@ -111,7 +110,7 @@
   private Searcher getIndex (boolean even, boolean odd)
   throws IOException {
     RAMDirectory indexStore = new RAMDirectory ();
-    IndexWriter writer = new IndexWriter (indexStore, new SimpleAnalyzer(Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
+    IndexWriter writer = new IndexWriter (indexStore, new SimpleAnalyzer(TEST_VERSION_CURRENT), true, IndexWriter.MaxFieldLength.LIMITED);
     writer.setMaxBufferedDocs(2);
     writer.setMergeFactor(1000);
     for (int i=0; i<data.length; ++i) {
@@ -175,7 +174,7 @@
   }
 
   @Override
-  public void setUp() throws Exception {
+  protected void setUp() throws Exception {
     super.setUp();
     full = getFullIndex();
     queryX = new TermQuery (new Term ("contents", "x"));
@@ -225,7 +224,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Integer.valueOf(slotValues[slot]);
     }
   }
@@ -272,9 +271,9 @@
   public void testNormalizedScores() throws Exception {
 
     // capture relevancy scores
-    HashMap scoresX = getScores (full.search (queryX, null, 1000).scoreDocs, full);
-    HashMap scoresY = getScores (full.search (queryY, null, 1000).scoreDocs, full);
-    HashMap scoresA = getScores (full.search (queryA, null, 1000).scoreDocs, full);
+    HashMap<String,Float> scoresX = getScores (full.search (queryX, null, 1000).scoreDocs, full);
+    HashMap<String,Float> scoresY = getScores (full.search (queryY, null, 1000).scoreDocs, full);
+    HashMap<String,Float> scoresA = getScores (full.search (queryA, null, 1000).scoreDocs, full);
 
     // we'll test searching locally, remote and multi
     MultiSearcher remote = new MultiSearcher (new Searchable[] { getRemote() });
@@ -415,9 +414,9 @@
     assertEquals (expectedResult, buff.toString());
   }
 
-  private HashMap getScores (ScoreDoc[] hits, Searcher searcher)
+  private HashMap<String, Float> getScores (ScoreDoc[] hits, Searcher searcher)
   throws IOException {
-    HashMap scoreMap = new HashMap();
+    HashMap<String, Float> scoreMap = new HashMap<String, Float>();
     int n = hits.length;
     for (int i=0; i<n; ++i) {
       Document doc = searcher.doc(hits[i].doc);
@@ -429,11 +428,11 @@
   }
 
   // make sure all the values in the maps match
-  private void assertSameValues (HashMap m1, HashMap m2) {
+  private void assertSameValues (HashMap<?, ?> m1, HashMap<?, ?> m2) {
     int n = m1.size();
     int m = m2.size();
     assertEquals (n, m);
-    Iterator iter = m1.keySet().iterator();
+    Iterator<?> iter = m1.keySet().iterator();
     while (iter.hasNext()) {
       Object key = iter.next();
       Object o1 = m1.get(key);

Modified: lucene/java/branches/flex_1458/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java (original)
+++ lucene/java/branches/flex_1458/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java Sat Feb 27 22:51:44 2010
@@ -54,20 +54,17 @@
 	@Override
 	public FieldComparator newComparator(String fieldname, int numHits,
 			int sortPos, boolean reversed) throws IOException {
-		dsdlc = new DistanceScoreDocLookupComparator(distanceFilter, numHits);
+		dsdlc = new DistanceScoreDocLookupComparator(numHits);
 		return dsdlc;
 	}
 
 	private class DistanceScoreDocLookupComparator extends FieldComparator {
 
-		private DistanceFilter distanceFilter;
 		private double[] values;
 		private double bottom;
 		private int offset =0;
 		
-		public DistanceScoreDocLookupComparator(DistanceFilter distanceFilter,
-				int numHits) {
-			this.distanceFilter = distanceFilter;
+		public DistanceScoreDocLookupComparator(int numHits) {
 			values = new double[numHits];
 			return;
 		}

Modified: lucene/java/branches/flex_1458/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceHandler.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceHandler.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceHandler.java (original)
+++ lucene/java/branches/flex_1458/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceHandler.java Sat Feb 27 22:51:44 2010
@@ -31,7 +31,7 @@
  */
 public class DistanceHandler {
 
-  public enum Precision {EXACT, TWOFEET, TWENTYFEET, TWOHUNDREDFEET};
+  public enum Precision {EXACT, TWOFEET, TWENTYFEET, TWOHUNDREDFEET}
   
   private Map<Integer,Double> distances;
   private Map<String, Double> distanceLookupCache;

Modified: lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java (original)
+++ lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java Sat Feb 27 22:51:44 2010
@@ -21,8 +21,6 @@
 import java.util.List;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
@@ -49,18 +47,11 @@
 import org.apache.lucene.spatial.tier.projections.SinusoidalProjector;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMDirectory;
+import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.NumericUtils;
-import org.apache.lucene.util.Version;
 
-/**
- *
- */
-public class TestCartesian extends TestCase{
-
-  /**
-   * @param args
-   */
-  
+public class TestCartesian extends LuceneTestCase {
+
   private Directory directory;
   private IndexSearcher searcher;
   // reston va
@@ -76,10 +67,11 @@
 
 
   @Override
-  protected void setUp() throws IOException {
+  protected void setUp() throws Exception {
+    super.setUp();
     directory = new RAMDirectory();
 
-    IndexWriter writer = new IndexWriter(directory, new WhitespaceAnalyzer(Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
+    IndexWriter writer = new IndexWriter(directory, new WhitespaceAnalyzer(TEST_VERSION_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
     
     setUpPlotter( 2, 15);
     
@@ -495,8 +487,8 @@
       // As the radius filter has performed the distance calculations
       // already, pass in the filter to reuse the results.
       // 
-      DistanceFieldComparatorSource dsort = new DistanceFieldComparatorSource(dq.distanceFilter);
-      Sort sort = new Sort(new SortField("foo", dsort));
+      //DistanceFieldComparatorSource dsort = new DistanceFieldComparatorSource(dq.distanceFilter);
+      //Sort sort = new Sort(new SortField("foo", dsort));
 	    
       // Perform the search, using the term query, the serial chain filter, and the
       // distance sort

Modified: lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java (original)
+++ lucene/java/branches/flex_1458/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestDistance.java Sat Feb 27 22:51:44 2010
@@ -18,8 +18,6 @@
 
 import java.io.IOException;
 
-import junit.framework.TestCase;
-
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
@@ -28,16 +26,11 @@
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.QueryWrapperFilter;
 import org.apache.lucene.search.MatchAllDocsQuery;
+import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.NumericUtils;
-import org.apache.lucene.util.Version;
 import org.apache.lucene.store.RAMDirectory;
 
-
-/**
- *
- */
-public class TestDistance extends TestCase{
-
+public class TestDistance extends LuceneTestCase {
   
   private RAMDirectory directory;
   // reston va
@@ -48,16 +41,18 @@
   private IndexWriter writer;
   
   @Override
-  protected void setUp() throws IOException {
+  protected void setUp() throws Exception {
+    super.setUp();
     directory = new RAMDirectory();
-    writer = new IndexWriter(directory, new WhitespaceAnalyzer(Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
+    writer = new IndexWriter(directory, new WhitespaceAnalyzer(TEST_VERSION_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
     addData(writer);
     
   }
 
   @Override
-  protected void tearDown() throws IOException {
+  protected void tearDown() throws Exception {
     writer.close();
+    super.tearDown();
   }
   
   private void addPoint(IndexWriter writer, String name, double lat, double lng) throws IOException{

Modified: lucene/java/branches/flex_1458/contrib/spellchecker/src/java/org/apache/lucene/search/spell/JaroWinklerDistance.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spellchecker/src/java/org/apache/lucene/search/spell/JaroWinklerDistance.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spellchecker/src/java/org/apache/lucene/search/spell/JaroWinklerDistance.java (original)
+++ lucene/java/branches/flex_1458/contrib/spellchecker/src/java/org/apache/lucene/search/spell/JaroWinklerDistance.java Sat Feb 27 22:51:44 2010
@@ -82,7 +82,7 @@
 
   public float getDistance(String s1, String s2) {
     int[] mtp = matches(s1, s2);
-    float m = (float) mtp[0];
+    float m = mtp[0];
     if (m == 0) {
       return 0f;
     }

Modified: lucene/java/branches/flex_1458/contrib/spellchecker/src/java/org/apache/lucene/search/spell/NGramDistance.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spellchecker/src/java/org/apache/lucene/search/spell/NGramDistance.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spellchecker/src/java/org/apache/lucene/search/spell/NGramDistance.java (original)
+++ lucene/java/branches/flex_1458/contrib/spellchecker/src/java/org/apache/lucene/search/spell/NGramDistance.java Sat Feb 27 22:51:44 2010
@@ -138,7 +138,7 @@
 
     // our last action in the above loop was to switch d and p, so p now
     // actually has the most recent cost counts
-    return 1.0f - ((float) p[sl] / Math.max(tl, sl));
+    return 1.0f - (p[sl] / Math.max(tl, sl));
   }
 
 }

Modified: lucene/java/branches/flex_1458/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java (original)
+++ lucene/java/branches/flex_1458/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestLuceneDictionary.java Sat Feb 27 22:51:44 2010
@@ -20,8 +20,6 @@
 import java.io.IOException;
 import java.util.Iterator;
 
-import junit.framework.TestCase;
-
 import org.apache.lucene.analysis.WhitespaceAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
@@ -29,27 +27,26 @@
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMDirectory;
-import org.apache.lucene.util.Version;
+import org.apache.lucene.util.LuceneTestCase;
 
 /**
  * Test case for LuceneDictionary.
  * It first creates a simple index and then a couple of instances of LuceneDictionary
  * on different fields and checks if all the right text comes back.
- *
  */
-public class TestLuceneDictionary extends TestCase {
+public class TestLuceneDictionary extends LuceneTestCase {
 
   private Directory store = new RAMDirectory();
 
   private IndexReader indexReader = null;
 
   private LuceneDictionary ld;
-  private Iterator it;
+  private Iterator<String> it;
 
   @Override
-  public void setUp() throws Exception {
-
-    IndexWriter writer = new IndexWriter(store, new WhitespaceAnalyzer(Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
+  protected void setUp() throws Exception {
+    super.setUp();
+    IndexWriter writer = new IndexWriter(store, new WhitespaceAnalyzer(LuceneTestCase.TEST_VERSION_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
 
     Document doc;
 

Modified: lucene/java/branches/flex_1458/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java (original)
+++ lucene/java/branches/flex_1458/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java Sat Feb 27 22:51:44 2010
@@ -38,13 +38,9 @@
 import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.English;
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.lucene.util.Version;
-
 
 /**
  * Spell checker test case
- *
- *
  */
 public class TestSpellChecker extends LuceneTestCase {
   private SpellCheckerMock spellChecker;
@@ -58,7 +54,7 @@
     
     //create a user index
     userindex = new RAMDirectory();
-    IndexWriter writer = new IndexWriter(userindex, new SimpleAnalyzer(Version.LUCENE_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
+    IndexWriter writer = new IndexWriter(userindex, new SimpleAnalyzer(TEST_VERSION_CURRENT), true, IndexWriter.MaxFieldLength.UNLIMITED);
 
     for (int i = 0; i < 1000; i++) {
       Document doc = new Document();
@@ -335,15 +331,16 @@
       assertEquals(0, searcher.getIndexReader().getRefCount());
     }
   }
-  
-  private void showSearchersOpen() {
-    int count = 0;
-    for (IndexSearcher searcher : searchers) {
-      if(searcher.getIndexReader().getRefCount() > 0)
-        ++count;
-    } 
-    System.out.println(count);
-  }
+
+  // For debug
+//  private void showSearchersOpen() {
+//    int count = 0;
+//    for (IndexSearcher searcher : searchers) {
+//      if(searcher.getIndexReader().getRefCount() > 0)
+//        ++count;
+//    } 
+//    System.out.println(count);
+//  }
 
   
   private class SpellCheckWorker implements Runnable {

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/DistanceQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/DistanceQuery.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/DistanceQuery.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/DistanceQuery.java Sat Feb 27 22:51:44 2010
@@ -46,7 +46,7 @@
   public boolean subQueriesOrdered() {return ordered;}
   
   public String distanceSubQueryNotAllowed() {
-    Iterator sqi = getSubQueriesIterator();
+    Iterator<?> sqi = getSubQueriesIterator();
     while (sqi.hasNext()) {
       Object leq = sqi.next();
       if (leq instanceof DistanceSubQuery) {
@@ -94,7 +94,7 @@
           float boost,
           BasicQueryFactory qf) throws IOException {
     SpanQuery[] spanNearClauses = new SpanQuery[getNrSubQueries()];
-    Iterator sqi = getSubQueriesIterator();
+    Iterator<?> sqi = getSubQueriesIterator();
     int qi = 0;
     while (sqi.hasNext()) {
       SpanNearClauseFactory sncf = new SpanNearClauseFactory(reader, fieldName, qf);

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java Sat Feb 27 22:51:44 2010
@@ -57,7 +57,6 @@
         qc = (SrndQuery) q.clone();
         queries.add( new FieldsQuery( qc, fni.next(), fieldOp));
       }
-      boolean infix = true;
       OrQuery oq = new OrQuery(queries,
                               true /* infix OR for field names */,
                               OrOperatorName);

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java Sat Feb 27 22:51:44 2010
@@ -44,7 +44,7 @@
     return this.toStringUnquoted().compareTo( ost.toStringUnquoted());
   }
   
-  protected void suffixToString(StringBuilder r) {;} /* override for prefix query */
+  protected void suffixToString(StringBuilder r) {} /* override for prefix query */
   
   @Override
   public String toString() {

Modified: lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SpanNearClauseFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SpanNearClauseFactory.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SpanNearClauseFactory.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SpanNearClauseFactory.java Sat Feb 27 22:51:44 2010
@@ -52,23 +52,17 @@
    - SpanNotQuery: treat similar to subquery SpanNearQuery. (ok?)
  */
 
+import java.io.IOException;
 import java.util.HashMap;
 import java.util.Iterator;
 
-import java.util.Comparator;
-import java.util.Arrays;
-
-import java.io.IOException;
-
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermEnum;
-
 import org.apache.lucene.search.Query;
-
-import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.SpanNearQuery;
 import org.apache.lucene.search.spans.SpanOrQuery;
+import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.SpanTermQuery;
 
 

Modified: lucene/java/branches/flex_1458/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/BooleanQueryTst.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/BooleanQueryTst.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/BooleanQueryTst.java (original)
+++ lucene/java/branches/flex_1458/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/BooleanQueryTst.java Sat Feb 27 22:51:44 2010
@@ -29,6 +29,7 @@
 import org.apache.lucene.queryParser.surround.parser.QueryParser;
 
 import junit.framework.TestCase;
+import junit.framework.Assert;
 
 public class BooleanQueryTst {
   String queryText;
@@ -87,8 +88,8 @@
       float score = scorer.score();
       docNr += docBase;
       /* System.out.println(docNr + " '" + dBase.getDocs()[docNr] + "': " + score); */
-      TestCase.assertTrue(queryText + ": positive score", score > 0.0);
-      TestCase.assertTrue(queryText + ": too many hits", totalMatched < expectedDocNrs.length);
+      Assert.assertTrue(queryText + ": positive score", score > 0.0);
+      Assert.assertTrue(queryText + ": too many hits", totalMatched < expectedDocNrs.length);
       int i;
       for (i = 0; i < expectedDocNrs.length; i++) {
         if ((! encountered[i]) && (expectedDocNrs[i] == docNr)) {
@@ -97,13 +98,13 @@
         }
       }
       if (i == expectedDocNrs.length) {
-        TestCase.assertTrue(queryText + ": doc nr for hit not expected: " + docNr, false);
+        Assert.assertTrue(queryText + ": doc nr for hit not expected: " + docNr, false);
       }
       totalMatched++;
     }
 
     void checkNrHits() {
-      TestCase.assertEquals(queryText + ": nr of hits", expectedDocNrs.length, totalMatched);
+      Assert.assertEquals(queryText + ": nr of hits", expectedDocNrs.length, totalMatched);
     }
   }
 

Modified: lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/BaseListModel.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/BaseListModel.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/BaseListModel.java (original)
+++ lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/BaseListModel.java Sat Feb 27 22:51:44 2010
@@ -24,9 +24,9 @@
 
 
 public class BaseListModel extends AbstractListModel {
-    private List data = new ArrayList();
+    private List<Object> data = new ArrayList<Object>();
 
-    public BaseListModel(Iterator iterator) {
+    public BaseListModel(Iterator<?> iterator) {
         while (iterator.hasNext()) {
             data.add(iterator.next());
         }

Modified: lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/BaseTableModel.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/BaseTableModel.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/BaseTableModel.java (original)
+++ lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/BaseTableModel.java Sat Feb 27 22:51:44 2010
@@ -24,10 +24,10 @@
 
 
 public class BaseTableModel extends AbstractTableModel {
-    private List columnNames = new ArrayList();
-    private List rows = new ArrayList();
+    private List<String> columnNames = new ArrayList<String>();
+    private List<Object> rows = new ArrayList<Object>();
 
-    public BaseTableModel(Iterator data) {
+    public BaseTableModel(Iterator<?> data) {
         columnNames.add("Name");
         columnNames.add("Type");
         columnNames.add("Phone");
@@ -37,7 +37,7 @@
         columnNames.add("Zip");
 
         while (data.hasNext()) {
-            Object nextRow = (Object) data.next();
+            Object nextRow = data.next();
             rows.add(nextRow);
         }
     }
@@ -66,7 +66,7 @@
     }
 
     @Override
-    public Class getColumnClass(int columnIndex) {
+    public Class<?> getColumnClass(int columnIndex) {
         return String.class;
     }
 

Modified: lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/DataStore.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/DataStore.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/DataStore.java (original)
+++ lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/DataStore.java Sat Feb 27 22:51:44 2010
@@ -30,7 +30,7 @@
     private static final String STEAK_CATEGORY = "Steak";
     private static int id = 0;
 
-    static Collection restaurants = new ArrayList();
+    static Collection<RestaurantInfo> restaurants = new ArrayList<RestaurantInfo>();
     static RestaurantInfo pinos = new RestaurantInfo();
     static RestaurantInfo canolis = new RestaurantInfo();
     static RestaurantInfo picadillo = new RestaurantInfo();
@@ -47,7 +47,7 @@
     static RestaurantInfo outback4 = new RestaurantInfo();
 
 
-    public static Iterator getRestaurants(){
+    public static Iterator<RestaurantInfo> getRestaurants(){
         return restaurants.iterator();
     }
 

Modified: lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicList.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicList.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicList.java (original)
+++ lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicList.java Sat Feb 27 22:51:44 2010
@@ -28,11 +28,11 @@
 public class TestBasicList extends TestCase {
     private ListModel baseListModel;
     private ListSearcher listSearcher;
-    private List list;
+    private List<RestaurantInfo> list;
 
     @Override
     protected void setUp() throws Exception {
-        list = new ArrayList();
+        list = new ArrayList<RestaurantInfo>();
         list.add(DataStore.canolis);
         list.add(DataStore.chris);
 

Modified: lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicTable.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicTable.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicTable.java (original)
+++ lucene/java/branches/flex_1458/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicTable.java Sat Feb 27 22:51:44 2010
@@ -27,11 +27,11 @@
 public class TestBasicTable extends TestCase {
     private TableModel baseTableModel;
     private TableSearcher tableSearcher;
-    private List list;
+    private List<RestaurantInfo> list;
 
     @Override
     protected void setUp() throws Exception {
-        list = new ArrayList();
+        list = new ArrayList<RestaurantInfo>();
         list.add(DataStore.canolis);
         list.add(DataStore.chris);
 

Modified: lucene/java/branches/flex_1458/contrib/wikipedia/src/java/org/apache/lucene/wikipedia/analysis/WikipediaTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/wikipedia/src/java/org/apache/lucene/wikipedia/analysis/WikipediaTokenizer.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/wikipedia/src/java/org/apache/lucene/wikipedia/analysis/WikipediaTokenizer.java (original)
+++ lucene/java/branches/flex_1458/contrib/wikipedia/src/java/org/apache/lucene/wikipedia/analysis/WikipediaTokenizer.java Sat Feb 27 22:51:44 2010
@@ -17,7 +17,6 @@
 
 package org.apache.lucene.wikipedia.analysis;
 
-import org.apache.lucene.analysis.Token;
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.tokenattributes.FlagsAttribute;
 import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;

Modified: lucene/java/branches/flex_1458/contrib/wikipedia/src/test/org/apache/lucene/wikipedia/analysis/WikipediaTokenizerTest.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/wikipedia/src/test/org/apache/lucene/wikipedia/analysis/WikipediaTokenizerTest.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/wikipedia/src/test/org/apache/lucene/wikipedia/analysis/WikipediaTokenizerTest.java (original)
+++ lucene/java/branches/flex_1458/contrib/wikipedia/src/test/org/apache/lucene/wikipedia/analysis/WikipediaTokenizerTest.java Sat Feb 27 22:51:44 2010
@@ -67,7 +67,7 @@
             "'''same [[Category:foo]] goes for this '''''and2 [[Category:foo]] and this" +
             " [http://foo.boo.com/test/test/ Test Test] [http://foo.boo.com/test/test/test.html Test Test]" +
             " [http://foo.boo.com/test/test/test.html?g=b&c=d Test Test] <ref>Citation</ref> <sup>martian</sup> <span class=\"glue\">code</span>";
-    Map tcm = new HashMap();//map tokens to types
+    Map<String,String> tcm = new HashMap<String,String>();//map tokens to types
     tcm.put("link", WikipediaTokenizer.INTERNAL_LINK);
     tcm.put("display", WikipediaTokenizer.INTERNAL_LINK);
     tcm.put("info", WikipediaTokenizer.INTERNAL_LINK);
@@ -144,7 +144,7 @@
     while (tf.incrementToken()) {
       String tokText = termAtt.term();
       //System.out.println("Text: " + tokText + " Type: " + token.type());
-      String expectedType = (String) tcm.get(tokText);
+      String expectedType = tcm.get(tokText);
       assertTrue("expectedType is null and it shouldn't be for: " + tf.toString(), expectedType != null);
       assertTrue(typeAtt.type() + " is not equal to " + expectedType + " for " + tf.toString(), typeAtt.type().equals(expectedType) == true);
       count++;
@@ -264,7 +264,7 @@
   }
 
   public void testLucene1133() throws Exception {
-    Set untoks = new HashSet();
+    Set<String> untoks = new HashSet<String>();
     untoks.add(WikipediaTokenizer.CATEGORY);
     untoks.add(WikipediaTokenizer.ITALICS);
     //should be exactly the same, regardless of untoks
@@ -342,7 +342,7 @@
   }
 
   public void testBoth() throws Exception {
-    Set untoks = new HashSet();
+    Set<String> untoks = new HashSet<String>();
     untoks.add(WikipediaTokenizer.CATEGORY);
     untoks.add(WikipediaTokenizer.ITALICS);
     String test = "[[Category:a b c d]] [[Category:e f g]] [[link here]] [[link there]] ''italics here'' something ''more italics'' [[Category:h   i   j]]";

Modified: lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/AnalyzerUtil.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/AnalyzerUtil.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/AnalyzerUtil.java (original)
+++ lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/AnalyzerUtil.java Sat Feb 27 22:51:44 2010
@@ -46,7 +46,7 @@
  */
 public class AnalyzerUtil {
   
-  private AnalyzerUtil() {};
+  private AnalyzerUtil() {}
 
   /**
    * Returns a simple analyzer wrapper that logs all tokens produced by the
@@ -367,7 +367,7 @@
     public void setValue(int value) { this.value = value; }
     @Override
     public String toString() { return String.valueOf(value); }
-  };
+  }
   
   
   
@@ -400,7 +400,7 @@
   
   // TODO: don't split on floating point numbers, e.g. 3.1415 (digit before or after '.')
   /** Divides text into sentences; Includes inverted spanish exclamation and question mark */
-  private static final Pattern SENTENCES  = Pattern.compile("[!\\.\\?\\xA1\\xBF]+");
+//  private static final Pattern SENTENCES  = Pattern.compile("[!\\.\\?\\xA1\\xBF]+");
 
   /**
    * Returns at most the first N sentences of the given text. Delimiting

Modified: lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynExpand.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynExpand.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynExpand.java (original)
+++ lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynExpand.java Sat Feb 27 22:51:44 2010
@@ -131,7 +131,7 @@
 		while ( it.hasNext())
 		{
 			// [2a] add to level words in
-			String word = (String) it.next();
+			String word = it.next();
 			TermQuery tq = new TermQuery( new Term( field, word));
 			tmp.add( tq, BooleanClause.Occur.SHOULD);
 

Modified: lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java (original)
+++ lucene/java/branches/flex_1458/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java Sat Feb 27 22:51:44 2010
@@ -68,10 +68,12 @@
  * xxxx:[]
  * </pre>
  *
- * @see <a target="_blank"
+ * <p>
+ * <b>See also:</b><br>
+ * <a target="_blank"
  *      href="http://www.cogsci.princeton.edu/~wn/man/prologdb.5WN.html">prologdb
- *      man page </a>
- * @see <a target="_blank" href="http://www.hostmon.com/rfc/advanced.jsp">Dave's synonym demo site</a>
+ *      man page </a><br>
+ * <a target="_blank" href="http://www.hostmon.com/rfc/advanced.jsp">Dave's synonym demo site</a>
  */
 public class SynonymMap {
 
@@ -389,7 +391,7 @@
       System.arraycopy(output, 0, buffer, 0, len);
       return buffer;
     } finally {
-      if (input != null) input.close();
+      input.close();
     }
   }
   

Modified: lucene/java/branches/flex_1458/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java (original)
+++ lucene/java/branches/flex_1458/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java Sat Feb 27 22:51:44 2010
@@ -21,7 +21,6 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.Reader;
-import java.io.StringReader;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.LowerCaseFilter;
@@ -29,7 +28,6 @@
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.WhitespaceTokenizer;
 import org.apache.lucene.analysis.BaseTokenStreamTestCase;
-import org.apache.lucene.util.Version;
 
 public class TestSynonymTokenFilter extends BaseTokenStreamTestCase {
   File dataDir = new File(System.getProperty("dataDir", "./bin"));
@@ -96,8 +94,8 @@
     
     @Override
     public TokenStream tokenStream(String fieldName, Reader reader) {
-      TokenStream ts = new WhitespaceTokenizer(reader);
-      ts = new LowerCaseFilter(Version.LUCENE_CURRENT, ts);
+      TokenStream ts = new WhitespaceTokenizer(TEST_VERSION_CURRENT, reader);
+      ts = new LowerCaseFilter(TEST_VERSION_CURRENT, ts);
       ts = new SynonymTokenFilter(ts, synonyms, maxSynonyms);
       return ts;
     }
@@ -105,7 +103,7 @@
     private class SavedStreams {
       Tokenizer source;
       TokenStream result;
-    };
+    }
     
     @Override
     public TokenStream reusableTokenStream(String fieldName, Reader reader)
@@ -113,8 +111,8 @@
       SavedStreams streams = (SavedStreams) getPreviousTokenStream();
       if (streams == null) {
         streams = new SavedStreams();
-        streams.source = new WhitespaceTokenizer(reader);
-        streams.result = new LowerCaseFilter(Version.LUCENE_CURRENT, streams.source);
+        streams.source = new WhitespaceTokenizer(TEST_VERSION_CURRENT, reader);
+        streams.result = new LowerCaseFilter(TEST_VERSION_CURRENT, streams.source);
         streams.result = new SynonymTokenFilter(streams.result, synonyms, maxSynonyms);
         setPreviousTokenStream(streams);
       } else {

Modified: lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/QueryTemplateManager.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/QueryTemplateManager.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/QueryTemplateManager.java (original)
+++ lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/QueryTemplateManager.java Sat Feb 27 22:51:44 2010
@@ -11,7 +11,6 @@
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Result;
-import javax.xml.transform.Source;
 import javax.xml.transform.Templates;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;

Modified: lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java (original)
+++ lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java Sat Feb 27 22:51:44 2010
@@ -2,7 +2,6 @@
 
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.spans.SpanQuery;
-import org.apache.lucene.search.spans.SpanTermQuery;
 import org.apache.lucene.search.payloads.PayloadTermQuery;
 import org.apache.lucene.search.payloads.AveragePayloadFunction;
 import org.apache.lucene.xmlparser.DOMUtils;

Modified: lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java (original)
+++ lucene/java/branches/flex_1458/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java Sat Feb 27 22:51:44 2010
@@ -3,17 +3,12 @@
  */
 package org.apache.lucene.xmlparser.builders;
 
-import org.apache.lucene.search.BooleanClause;
-import org.apache.lucene.search.BooleanFilter;
 import org.apache.lucene.search.DuplicateFilter;
 import org.apache.lucene.search.Filter;
-import org.apache.lucene.search.FilterClause;
 import org.apache.lucene.xmlparser.DOMUtils;
 import org.apache.lucene.xmlparser.FilterBuilder;
 import org.apache.lucene.xmlparser.ParserException;
 import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more

Modified: lucene/java/branches/flex_1458/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java (original)
+++ lucene/java/branches/flex_1458/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java Sat Feb 27 22:51:44 2010
@@ -7,8 +7,6 @@
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
 
-import junit.framework.TestCase;
-
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.document.Field;
@@ -16,6 +14,7 @@
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.store.RAMDirectory;
+import org.apache.lucene.util.LuceneTestCase;
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
@@ -39,10 +38,10 @@
  * This class illustrates how form input (such as from a web page or Swing gui) can be
  * turned into Lucene queries using a choice of XSL templates for different styles of queries.
  */
-public class TestQueryTemplateManager extends TestCase {
+public class TestQueryTemplateManager extends LuceneTestCase {
 
 	CoreParser builder;
-	Analyzer analyzer=new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT);
+	Analyzer analyzer=new StandardAnalyzer(TEST_VERSION_CURRENT);
 	private IndexSearcher searcher;
 	
 	//A collection of documents' field values for use in our tests
@@ -160,5 +159,6 @@
 	@Override
 	protected void tearDown() throws Exception {
 		searcher.close();
+    super.tearDown();
 	}
 }

Modified: lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/IndexFiles.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/IndexFiles.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/IndexFiles.java (original)
+++ lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/IndexFiles.java Sat Feb 27 22:51:44 2010
@@ -91,7 +91,6 @@
         // at least on windows, some temporary files raise this exception with an "access denied" message
         // checking if the file can be read doesn't help
         catch (FileNotFoundException fnfe) {
-          ;
         }
       }
     }

Modified: lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/Entities.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/Entities.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/Entities.java (original)
+++ lucene/java/branches/flex_1458/src/demo/org/apache/lucene/demo/html/Entities.java Sat Feb 27 22:51:44 2010
@@ -38,7 +38,7 @@
 	new Character((char)Integer.parseInt(entity.substring(start), radix));
       return c.toString();
     } else {
-      String s = (String)decoder.get(entity);
+      String s = decoder.get(entity);
       if (s != null)
 	return s;
       else return "";
@@ -49,17 +49,15 @@
     int length = s.length();
     StringBuffer buffer = new StringBuffer(length * 2);
     for (int i = 0; i < length; i++) {
-      char c = s.charAt(i);
-      int j = (int)c;
+      int j = s.charAt(i);
       if (j < 0x100 && encoder[j] != null) {
 	buffer.append(encoder[j]);		  // have a named encoding
 	buffer.append(';');
       } else if (j < 0x80) {
-	buffer.append(c);			  // use ASCII value
+	buffer.append((char) j);			  // use ASCII value
       } else {
 	buffer.append("&#");			  // use numeric encoding
-	buffer.append((int)c);
-	buffer.append(';');
+	buffer.append(j).append(';');
       }
     }
     return buffer.toString();

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArrayMap.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArrayMap.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArrayMap.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArrayMap.java Sat Feb 27 22:51:44 2010
@@ -488,7 +488,7 @@
     @Override
     public String toString() {
       return new StringBuilder().append(keys[pos]).append('=')
-        .append(((Object) values[pos] == (Object) CharArrayMap.this) ? "(this Map)" : values[pos])
+        .append((values[pos] == CharArrayMap.this) ? "(this Map)" : values[pos])
         .toString();
     }
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java Sat Feb 27 22:51:44 2010
@@ -17,7 +17,6 @@
  * limitations under the License.
  */
 
-import java.util.Arrays;
 import java.util.AbstractSet;
 import java.util.Collection;
 import java.util.Iterator;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/NumericTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/NumericTokenStream.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/NumericTokenStream.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/NumericTokenStream.java Sat Feb 27 22:51:44 2010
@@ -22,8 +22,6 @@
 import org.apache.lucene.document.NumericField; // for javadocs
 import org.apache.lucene.search.NumericRangeQuery; // for javadocs
 import org.apache.lucene.search.NumericRangeFilter; // for javadocs
-import org.apache.lucene.search.SortField; // for javadocs
-import org.apache.lucene.search.FieldCache; // javadocs
 import org.apache.lucene.analysis.tokenattributes.TermAttribute;
 import org.apache.lucene.analysis.tokenattributes.TypeAttribute;
 import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
@@ -162,7 +160,7 @@
    * <code>new Field(name, new NumericTokenStream(precisionStep).setIntValue(value))</code>
    */
   public NumericTokenStream setIntValue(final int value) {
-    this.value = (long) value;
+    this.value = value;
     valSize = 32;
     shift = 0;
     return this;
@@ -188,7 +186,7 @@
    * <code>new Field(name, new NumericTokenStream(precisionStep).setFloatValue(value))</code>
    */
   public NumericTokenStream setFloatValue(final float value) {
-    this.value = (long) NumericUtils.floatToSortableInt(value);
+    this.value = NumericUtils.floatToSortableInt(value);
     valSize = 32;
     shift = 0;
     return this;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java Sat Feb 27 22:51:44 2010
@@ -24,7 +24,6 @@
 import java.util.Set;
 import java.util.List;
 
-import org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents; // javadoc @link
 import org.apache.lucene.util.Version;
 
 /** Filters {@link LetterTokenizer} with {@link LowerCaseFilter} and {@link StopFilter}.
@@ -91,9 +90,12 @@
   }
 
   /**
-   * Creates {@link TokenStreamComponents} used to tokenize all the text in the provided {@link Reader}.
-   *
-   * @return {@link TokenStreamComponents} built from a {@link LowerCaseTokenizer} filtered with
+   * Creates
+   * {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents}
+   * used to tokenize all the text in the provided {@link Reader}.
+   * 
+   * @return {@link org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents}
+   *         built from a {@link LowerCaseTokenizer} filtered with
    *         {@link StopFilter}
    */
   @Override

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java Sat Feb 27 22:51:44 2010
@@ -124,7 +124,7 @@
    * This instance is exhausted after this, but all sinks are instant available.
    */
   public void consumeAllTokens() throws IOException {
-    while (incrementToken());
+    while (incrementToken()) {}
   }
   
   @Override

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java Sat Feb 27 22:51:44 2010
@@ -525,7 +525,7 @@
     Token t = (Token)super.clone();
     // Do a deep clone
     if (termBuffer != null) {
-      t.termBuffer = (char[]) termBuffer.clone();
+      t.termBuffer = termBuffer.clone();
     }
     if (payload != null) {
       t.payload = (Payload) payload.clone();

Propchange: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Tokenizer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Feb 27 22:51:44 2010
@@ -1 +1,2 @@
 /lucene/java/branches/lucene_2_9/src/java/org/apache/lucene/analysis/Tokenizer.java:909334
+/lucene/java/trunk/src/java/org/apache/lucene/analysis/Tokenizer.java:916596,916685,916769,917019

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java Sat Feb 27 22:51:44 2010
@@ -47,7 +47,7 @@
 
   /**
    * Specifies whether deprecated acronyms should be replaced with HOST type.
-   * See {@linkplain https://issues.apache.org/jira/browse/LUCENE-1068}
+   * See {@linkplain "https://issues.apache.org/jira/browse/LUCENE-1068"}
    */
   private final boolean replaceInvalidAcronym;
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java Sat Feb 27 22:51:44 2010
@@ -20,7 +20,6 @@
 import java.io.IOException;
 import java.io.Reader;
 
-import org.apache.lucene.analysis.Token;
 import org.apache.lucene.analysis.Tokenizer;
 import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
 import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java Sat Feb 27 22:51:44 2010
@@ -183,7 +183,7 @@
     TermAttributeImpl t = (TermAttributeImpl)super.clone();
     // Do a deep clone
     if (termBuffer != null) {
-      t.termBuffer = (char[]) termBuffer.clone();
+      t.termBuffer = termBuffer.clone();
     }
     return t;
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java Sat Feb 27 22:51:44 2010
@@ -18,6 +18,7 @@
 import org.apache.lucene.search.PhraseQuery; // for javadocs
 import org.apache.lucene.search.spans.SpanQuery; // for javadocs
 import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.index.FieldInvertState;
 import org.apache.lucene.util.StringHelper; // for javadocs
 
 
@@ -85,7 +86,7 @@
    * the range of that encoding.
    *
    * @see org.apache.lucene.document.Document#setBoost(float)
-   * @see org.apache.lucene.search.Similarity#computeNorm(String, org.apache.lucene.index.FieldInvertState)
+   * @see org.apache.lucene.search.Similarity#computeNorm(String, FieldInvertState)
    * @see org.apache.lucene.search.Similarity#encodeNormValue(float)
    */
   public void setBoost(float boost) {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/NumericField.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/NumericField.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/NumericField.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/NumericField.java Sat Feb 27 22:51:44 2010
@@ -140,7 +140,7 @@
  */
 public final class NumericField extends AbstractField {
 
-  private final NumericTokenStream tokenStream;
+  private final NumericTokenStream numericTS;
 
   /**
    * Creates a field for numeric values using the default <code>precisionStep</code>
@@ -195,12 +195,12 @@
   public NumericField(String name, int precisionStep, Field.Store store, boolean index) {
     super(name, store, index ? Field.Index.ANALYZED_NO_NORMS : Field.Index.NO, Field.TermVector.NO);
     setOmitTermFreqAndPositions(true);
-    tokenStream = new NumericTokenStream(precisionStep);
+    numericTS = new NumericTokenStream(precisionStep);
   }
 
   /** Returns a {@link NumericTokenStream} for indexing the numeric value. */
   public TokenStream tokenStreamValue()   {
-    return isIndexed() ? tokenStream : null;
+    return isIndexed() ? numericTS : null;
   }
   
   /** Returns always <code>null</code> for numeric fields */
@@ -231,7 +231,7 @@
    * <code>document.add(new NumericField(name, precisionStep).setLongValue(value))</code>
    */
   public NumericField setLongValue(final long value) {
-    tokenStream.setLongValue(value);
+    numericTS.setLongValue(value);
     fieldsData = Long.valueOf(value);
     return this;
   }
@@ -243,7 +243,7 @@
    * <code>document.add(new NumericField(name, precisionStep).setIntValue(value))</code>
    */
   public NumericField setIntValue(final int value) {
-    tokenStream.setIntValue(value);
+    numericTS.setIntValue(value);
     fieldsData = Integer.valueOf(value);
     return this;
   }
@@ -255,7 +255,7 @@
    * <code>document.add(new NumericField(name, precisionStep).setDoubleValue(value))</code>
    */
   public NumericField setDoubleValue(final double value) {
-    tokenStream.setDoubleValue(value);
+    numericTS.setDoubleValue(value);
     fieldsData = Double.valueOf(value);
     return this;
   }
@@ -267,7 +267,7 @@
    * <code>document.add(new NumericField(name, precisionStep).setFloatValue(value))</code>
    */
   public NumericField setFloatValue(final float value) {
-    tokenStream.setFloatValue(value);
+    numericTS.setFloatValue(value);
     fieldsData = Float.valueOf(value);
     return this;
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CheckIndex.java Sat Feb 27 22:51:44 2010
@@ -922,7 +922,7 @@
     System.out.println("");
 
     final int exitCode;
-    if (result != null && result.clean == true)
+    if (result.clean == true)
       exitCode = 0;
     else
       exitCode = 1;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java Sat Feb 27 22:51:44 2010
@@ -350,13 +350,13 @@
 
   protected class MergeThread extends Thread {
 
-    IndexWriter writer;
+    IndexWriter tWriter;
     MergePolicy.OneMerge startMerge;
     MergePolicy.OneMerge runningMerge;
     private volatile boolean done;
 
     public MergeThread(IndexWriter writer, MergePolicy.OneMerge startMerge) throws IOException {
-      this.writer = writer;
+      this.tWriter = writer;
       this.startMerge = startMerge;
     }
 
@@ -408,9 +408,9 @@
 
           // Subsequent times through the loop we do any new
           // merge that writer says is necessary:
-          merge = writer.getNextMerge();
+          merge = tWriter.getNextMerge();
           if (merge != null) {
-            writer.mergeInit(merge);
+            tWriter.mergeInit(merge);
             updateMergeThreads();
             if (verbose())
               message("  merge thread: do another merge " + merge.segString(dir));

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java Sat Feb 27 22:51:44 2010
@@ -132,21 +132,21 @@
 
   class PerDoc extends DocumentsWriter.DocWriter {
 
-    DocumentsWriter.DocWriter one;
-    DocumentsWriter.DocWriter two;
+    DocumentsWriter.DocWriter writerOne;
+    DocumentsWriter.DocWriter writerTwo;
 
     @Override
     public long sizeInBytes() {
-      return one.sizeInBytes() + two.sizeInBytes();
+      return writerOne.sizeInBytes() + writerTwo.sizeInBytes();
     }
 
     @Override
     public void finish() throws IOException {
       try {
         try {
-          one.finish();
+          writerOne.finish();
         } finally {
-          two.finish();
+          writerTwo.finish();
         }
       } finally {
         freePerDoc(this);
@@ -157,9 +157,9 @@
     public void abort() {
       try {
         try {
-          one.abort();
+          writerOne.abort();
         } finally {
-          two.abort();
+          writerTwo.abort();
         }
       } finally {
         freePerDoc(this);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java Sat Feb 27 22:51:44 2010
@@ -62,8 +62,8 @@
       both.docID = docState.docID;
       assert oneDoc.docID == docState.docID;
       assert twoDoc.docID == docState.docID;
-      both.one = oneDoc;
-      both.two = twoDoc;
+      both.writerOne = oneDoc;
+      both.writerTwo = twoDoc;
       return both;
     }
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldsReader.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldsReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldsReader.java Sat Feb 27 22:51:44 2010
@@ -352,9 +352,9 @@
       final byte[] b = new byte[toRead];
       fieldsStream.readBytes(b, 0, b.length);
       if (compressed) {
-        doc.add(new Field(fi.name, uncompress(b), Field.Store.YES));
+        doc.add(new Field(fi.name, uncompress(b)));
       } else {
-        doc.add(new Field(fi.name, b, Field.Store.YES));
+        doc.add(new Field(fi.name, b));
       }
     } else {
       Field.Store store = Field.Store.YES;
@@ -400,7 +400,7 @@
     sizebytes[1] = (byte) (bytesize>>>16);
     sizebytes[2] = (byte) (bytesize>>> 8);
     sizebytes[3] = (byte)  bytesize      ;
-    doc.add(new Field(fi.name, sizebytes, Field.Store.YES));
+    doc.add(new Field(fi.name, sizebytes));
     return size;
   }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexReader.java Sat Feb 27 22:51:44 2010
@@ -71,7 +71,7 @@
  </p>
 
  <a name="thread-safety"></a><p><b>NOTE</b>: {@link
- <code>IndexReader</code>} instances are completely thread
+ IndexReader} instances are completely thread
  safe, meaning multiple threads can call any of its methods,
  concurrently.  If your application requires external
  synchronization, you should <b>not</b> synchronize on the
@@ -499,8 +499,6 @@
    * mutable state obeys "copy on write" semantics to ensure
    * the changes are not seen by other readers.
    * <p>
-   * @throws CorruptIndexException if the index is corrupt
-   * @throws IOException if there is a low-level IO error
    */
   @Override
   public synchronized Object clone() {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/IndexWriter.java Sat Feb 27 22:51:44 2010
@@ -139,7 +139,7 @@
   directly.</p>
 
   <a name="thread-safety"></a><p><b>NOTE</b>: {@link
-  <code>IndexWriter</code>} instances are completely thread
+  IndexWriter} instances are completely thread
   safe, meaning multiple threads can call any of its
   methods, concurrently.  If your application requires
   external synchronization, you should <b>not</b>
@@ -406,7 +406,11 @@
     // just like we do when loading segments_N
     synchronized(this) {
       applyDeletes();
-      return new ReadOnlyDirectoryReader(this, segmentInfos, termInfosIndexDivisor, codecs);
+      final IndexReader r = new ReadOnlyDirectoryReader(this, segmentInfos, termInfosIndexDivisor, codecs);
+      if (infoStream != null) {
+        message("return reader version=" + r.getVersion() + " reader=" + r);
+      }
+      return r;
     }
   }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/MultiReader.java Sat Feb 27 22:51:44 2010
@@ -55,7 +55,6 @@
   * left to the subreaders. </p>
   * <p>Note that all subreaders are closed if this Multireader is closed.</p>
   * @param subReaders set of (sub)readers
-  * @throws IOException
   */
   public MultiReader(IndexReader... subReaders) throws IOException {
     initialize(subReaders, true);
@@ -68,7 +67,6 @@
    * @param closeSubReaders indicates whether the subreaders should be closed
    * when this MultiReader is closed
    * @param subReaders set of (sub)readers
-   * @throws IOException
    */
   public MultiReader(IndexReader[] subReaders, boolean closeSubReaders) throws IOException {
     initialize(subReaders, closeSubReaders);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Payload.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Payload.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Payload.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/Payload.java Sat Feb 27 22:51:44 2010
@@ -164,7 +164,7 @@
       // Only copy the part of data that belongs to this Payload
       if (offset == 0 && length == data.length) {
         // It is the whole thing, so just clone it.
-        clone.data = (byte[]) data.clone();
+        clone.data = data.clone();
       }
       else {
         // Just get the part

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ReusableStringReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ReusableStringReader.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ReusableStringReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ReusableStringReader.java Sat Feb 27 22:51:44 2010
@@ -53,6 +53,6 @@
     }
   }
   @Override
-  public void close() {};
+  public void close() {}
 }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfo.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfo.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfo.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfo.java Sat Feb 27 22:51:44 2010
@@ -343,7 +343,7 @@
     si.hasSingleNormFile = hasSingleNormFile;
     si.diagnostics = new HashMap<String, String>(diagnostics);
     if (normGen != null) {
-      si.normGen = (long[]) normGen.clone();
+      si.normGen = normGen.clone();
     }
     si.docStoreOffset = docStoreOffset;
     si.docStoreSegment = docStoreSegment;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfos.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfos.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfos.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/SegmentInfos.java Sat Feb 27 22:51:44 2010
@@ -716,9 +716,7 @@
               message("fallback to prior segment file '" + prevSegmentFileName + "'");
               try {
                 Object v = doBody(prevSegmentFileName);
-                if (exc != null) {
-                  message("success on fallback " + prevSegmentFileName);
-                }
+                message("success on fallback " + prevSegmentFileName);
                 return v;
               } catch (IOException err2) {
                 message("secondary Exception on '" + prevSegmentFileName + "': " + err2 + "'; will retry");

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/StoredFieldsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/StoredFieldsWriter.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/StoredFieldsWriter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/StoredFieldsWriter.java Sat Feb 27 22:51:44 2010
@@ -63,7 +63,6 @@
     if (fieldsWriter == null) {
       final String docStoreSegment = docWriter.getDocStoreSegment();
       if (docStoreSegment != null) {
-        assert docStoreSegment != null;
         fieldsWriter = new FieldsWriter(docWriter.directory,
                                         docStoreSegment,
                                         fieldInfos);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsReader.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsReader.java Sat Feb 27 22:51:44 2010
@@ -207,7 +207,7 @@
     // make all effort to close up. Keep the first exception
     // and throw it as a new one.
     IOException keep = null;
-    if (tvx != null) try { tvx.close(); } catch (IOException e) { if (keep == null) keep = e; }
+    if (tvx != null) try { tvx.close(); } catch (IOException e) { keep = e; }
     if (tvd != null) try { tvd.close(); } catch (IOException e) { if (keep == null) keep = e; }
     if (tvf  != null) try {  tvf.close(); } catch (IOException e) { if (keep == null) keep = e; }
     if (keep != null) throw (IOException) keep.fillInStackTrace();

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java Sat Feb 27 22:51:44 2010
@@ -149,8 +149,6 @@
       if (docStoreSegment == null)
         return;
 
-      assert docStoreSegment != null;
-
       // If we hit an exception while init'ing the term
       // vector output files, we must abort this segment
       // because those files will be in an unknown
@@ -193,8 +191,8 @@
         tvd.writeVLong(pos-lastPos);
         lastPos = pos;
       }
-      perDoc.tvf.writeTo(tvf);
-      perDoc.tvf.reset();
+      perDoc.perDocTvf.writeTo(tvf);
+      perDoc.perDocTvf.reset();
       perDoc.numVectorFields = 0;
     }
 
@@ -247,14 +245,14 @@
 
     // TODO: use something more memory efficient; for small
     // docs the 1024 buffer size of RAMOutputStream wastes alot
-    RAMOutputStream tvf = new RAMOutputStream();
+    RAMOutputStream perDocTvf = new RAMOutputStream();
     int numVectorFields;
 
     int[] fieldNumbers = new int[1];
     long[] fieldPointers = new long[1];
 
     void reset() {
-      tvf.reset();
+      perDocTvf.reset();
       numVectorFields = 0;
     }
 
@@ -272,13 +270,13 @@
         fieldPointers = ArrayUtil.grow(fieldPointers);
       }
       fieldNumbers[numVectorFields] = fieldNumber;
-      fieldPointers[numVectorFields] = tvf.getFilePointer();
+      fieldPointers[numVectorFields] = perDocTvf.getFilePointer();
       numVectorFields++;
     }
 
     @Override
     public long sizeInBytes() {
-      return tvf.sizeInBytes();
+      return perDocTvf.sizeInBytes();
     }
 
     @Override

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java Sat Feb 27 22:51:44 2010
@@ -74,8 +74,8 @@
         perThread.doc = termsWriter.getPerDoc();
         perThread.doc.docID = docState.docID;
         assert perThread.doc.numVectorFields == 0;
-        assert 0 == perThread.doc.tvf.length();
-        assert 0 == perThread.doc.tvf.getFilePointer();
+        assert 0 == perThread.doc.perDocTvf.length();
+        assert 0 == perThread.doc.perDocTvf.getFilePointer();
       } else {
         assert perThread.doc.docID == docState.docID;
 
@@ -117,7 +117,7 @@
     if (numPostings > maxNumPostings)
       maxNumPostings = numPostings;
 
-    final IndexOutput tvf = perThread.doc.tvf;
+    final IndexOutput tvf = perThread.doc.perDocTvf;
 
     // This is called once, after inverting all occurrences
     // of a given field in the doc.  At this point we flush
@@ -213,7 +213,7 @@
     p.freq = 1;
 
     if (doVectorOffsets) {
-      int startOffset = fieldState.offset + offsetAttribute.startOffset();;
+      int startOffset = fieldState.offset + offsetAttribute.startOffset();
       int endOffset = fieldState.offset + offsetAttribute.endOffset();
       
       termsHashPerField.writeVInt(1, startOffset);
@@ -236,7 +236,7 @@
     p.freq++;
 
     if (doVectorOffsets) {
-      int startOffset = fieldState.offset + offsetAttribute.startOffset();;
+      int startOffset = fieldState.offset + offsetAttribute.startOffset();
       int endOffset = fieldState.offset + offsetAttribute.endOffset();
       
       termsHashPerField.writeVInt(1, startOffset - p.lastOffset);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsWriter.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsWriter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermVectorsWriter.java Sat Feb 27 22:51:44 2010
@@ -199,7 +199,7 @@
       try {
         tvx.close();
       } catch (IOException e) {
-        if (keep == null) keep = e;
+        keep = e;
       }
     if (tvd != null)
       try {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermsHash.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermsHash.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermsHash.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/TermsHash.java Sat Feb 27 22:51:44 2010
@@ -64,7 +64,7 @@
     //       targets 25-50% fill factor; approximate this
     //       as 3X # pointers
     bytesPerPosting = consumer.bytesPerPosting() + 4*DocumentsWriter.POINTER_NUM_BYTE;
-    postingsFreeChunk = (int) (DocumentsWriter.BYTE_BLOCK_SIZE / bytesPerPosting);
+    postingsFreeChunk = (DocumentsWriter.BYTE_BLOCK_SIZE / bytesPerPosting);
   }
 
   @Override

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java Sat Feb 27 22:51:44 2010
@@ -84,7 +84,7 @@
     return doc;
   }
 
-  /** Determine the current document score.  Initially invalid, until {@link #next()} is called the first time.
+  /** Determine the current document score.  Initially invalid, until {@link #nextDoc()} is called the first time.
    * @return the score of the current generated document
    */
   @Override

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DisjunctionSumScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DisjunctionSumScorer.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DisjunctionSumScorer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DisjunctionSumScorer.java Sat Feb 27 22:51:44 2010
@@ -188,7 +188,7 @@
   }
   
   /** Returns the score of the current document matching the query.
-   * Initially invalid, until {@link #next()} is called the first time.
+   * Initially invalid, until {@link #nextDoc()} is called the first time.
    */
   @Override
   public float score() throws IOException { return currentScore; }
@@ -199,7 +199,7 @@
   }
   
   /** Returns the number of subscorers matching the current document.
-   * Initially invalid, until {@link #next()} is called the first time.
+   * Initially invalid, until {@link #nextDoc()} is called the first time.
    */
   public int nrMatchers() {
     return nrMatchers;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DocIdSetIterator.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DocIdSetIterator.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DocIdSetIterator.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/DocIdSetIterator.java Sat Feb 27 22:51:44 2010
@@ -28,8 +28,6 @@
  */
 public abstract class DocIdSetIterator {
   
-  private int doc = -1;
-  
   /**
    * When returned by {@link #nextDoc()}, {@link #advance(int)} and
    * {@link #docID()} it means there are no more docs in the iterator.

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCache.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCache.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCache.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCache.java Sat Feb 27 22:51:44 2010
@@ -521,7 +521,7 @@
   public static abstract class CacheEntry {
     public abstract Object getReaderKey();
     public abstract String getFieldName();
-    public abstract Class getCacheType();
+    public abstract Class<?> getCacheType();
     public abstract Object getCustom();
     public abstract Object getValue();
     private String size = null;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCacheImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCacheImpl.java?rev=917067&r1=917066&r2=917067&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCacheImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FieldCacheImpl.java Sat Feb 27 22:51:44 2010
@@ -306,7 +306,7 @@
       }
       return retArray;
     }
-  };
+  }
   
   // inherit javadocs
   public short[] getShorts (IndexReader reader, String field) throws IOException {
@@ -360,7 +360,7 @@
       }
       return retArray;
     }
-  };
+  }
   
   // inherit javadocs
   public int[] getInts (IndexReader reader, String field) throws IOException {
@@ -429,7 +429,7 @@
       }
       return retArray;
     }
-  };
+  }
 
 
   // inherit javadocs
@@ -501,7 +501,7 @@
       }
       return retArray;
     }
-  };
+  }
 
 
   public long[] getLongs(IndexReader reader, String field) throws IOException {
@@ -569,7 +569,7 @@
       }
       return retArray;
     }
-  };
+  }
 
   // inherit javadocs
   public double[] getDoubles(IndexReader reader, String field)
@@ -636,7 +636,7 @@
         retArray = new double[reader.maxDoc()];
       return retArray;
     }
-  };
+  }
 
   // inherit javadocs
   public String[] getStrings(IndexReader reader, String field)
@@ -678,7 +678,7 @@
       }
       return retArray;
     }
-  };
+  }
 
   // inherit javadocs
   public StringIndex getStringIndex(IndexReader reader, String field)
@@ -752,7 +752,7 @@
       //System.out.println("FC: done\n");
       return value;
     }
-  };
+  }
   
   private volatile PrintStream infoStream;
 



Mime
View raw message