lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r917019 [6/8] - in /lucene/java/trunk: ./ 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/lucene/analysis/br/ con...
Date Sat, 27 Feb 2010 19:14:09 GMT
Modified: lucene/java/trunk/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java (original)
+++ lucene/java/trunk/contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java Sat Feb 27 19:14:01 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/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/DistanceQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/DistanceQuery.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/DistanceQuery.java (original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/DistanceQuery.java Sat Feb 27 19:14:01 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/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java (original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/FieldsQuery.java Sat Feb 27 19:14:01 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/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java (original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SimpleTerm.java Sat Feb 27 19:14:01 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/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SpanNearClauseFactory.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SpanNearClauseFactory.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SpanNearClauseFactory.java (original)
+++ lucene/java/trunk/contrib/surround/src/java/org/apache/lucene/queryParser/surround/query/SpanNearClauseFactory.java Sat Feb 27 19:14:01 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/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/BooleanQueryTst.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/BooleanQueryTst.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/BooleanQueryTst.java (original)
+++ lucene/java/trunk/contrib/surround/src/test/org/apache/lucene/queryParser/surround/query/BooleanQueryTst.java Sat Feb 27 19:14:01 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/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/BaseListModel.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/BaseListModel.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/BaseListModel.java (original)
+++ lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/BaseListModel.java Sat Feb 27 19:14:01 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/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/BaseTableModel.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/BaseTableModel.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/BaseTableModel.java (original)
+++ lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/BaseTableModel.java Sat Feb 27 19:14:01 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/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/DataStore.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/DataStore.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/DataStore.java (original)
+++ lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/DataStore.java Sat Feb 27 19:14:01 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/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicList.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicList.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicList.java (original)
+++ lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicList.java Sat Feb 27 19:14:01 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/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicTable.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicTable.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicTable.java (original)
+++ lucene/java/trunk/contrib/swing/src/test/org/apache/lucene/swing/models/TestBasicTable.java Sat Feb 27 19:14:01 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/trunk/contrib/wikipedia/src/java/org/apache/lucene/wikipedia/analysis/WikipediaTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/wikipedia/src/java/org/apache/lucene/wikipedia/analysis/WikipediaTokenizer.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/wikipedia/src/java/org/apache/lucene/wikipedia/analysis/WikipediaTokenizer.java (original)
+++ lucene/java/trunk/contrib/wikipedia/src/java/org/apache/lucene/wikipedia/analysis/WikipediaTokenizer.java Sat Feb 27 19:14:01 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/trunk/contrib/wikipedia/src/test/org/apache/lucene/wikipedia/analysis/WikipediaTokenizerTest.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/wikipedia/src/test/org/apache/lucene/wikipedia/analysis/WikipediaTokenizerTest.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/wikipedia/src/test/org/apache/lucene/wikipedia/analysis/WikipediaTokenizerTest.java (original)
+++ lucene/java/trunk/contrib/wikipedia/src/test/org/apache/lucene/wikipedia/analysis/WikipediaTokenizerTest.java Sat Feb 27 19:14:01 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/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/AnalyzerUtil.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/AnalyzerUtil.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/AnalyzerUtil.java (original)
+++ lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/AnalyzerUtil.java Sat Feb 27 19:14:01 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/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynExpand.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynExpand.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynExpand.java (original)
+++ lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynExpand.java Sat Feb 27 19:14:01 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/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java (original)
+++ lucene/java/trunk/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java Sat Feb 27 19:14:01 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/trunk/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java (original)
+++ lucene/java/trunk/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java Sat Feb 27 19:14:01 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/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/QueryTemplateManager.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/QueryTemplateManager.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/QueryTemplateManager.java (original)
+++ lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/QueryTemplateManager.java Sat Feb 27 19:14:01 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/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java (original)
+++ lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/BoostingTermBuilder.java Sat Feb 27 19:14:01 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/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java (original)
+++ lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/DuplicateFilterBuilder.java Sat Feb 27 19:14:01 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/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java (original)
+++ lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestQueryTemplateManager.java Sat Feb 27 19:14:01 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/trunk/src/demo/org/apache/lucene/demo/IndexFiles.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/demo/org/apache/lucene/demo/IndexFiles.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/demo/org/apache/lucene/demo/IndexFiles.java (original)
+++ lucene/java/trunk/src/demo/org/apache/lucene/demo/IndexFiles.java Sat Feb 27 19:14:01 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/trunk/src/demo/org/apache/lucene/demo/html/Entities.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/demo/org/apache/lucene/demo/html/Entities.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/demo/org/apache/lucene/demo/html/Entities.java (original)
+++ lucene/java/trunk/src/demo/org/apache/lucene/demo/html/Entities.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/analysis/CharArrayMap.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/CharArrayMap.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/CharArrayMap.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/CharArrayMap.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/analysis/CharArraySet.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/CharArraySet.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/CharArraySet.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/CharArraySet.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/analysis/NumericTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/NumericTokenStream.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/NumericTokenStream.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/NumericTokenStream.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/analysis/StopAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/StopAnalyzer.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/StopAnalyzer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/StopAnalyzer.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/analysis/Token.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/Token.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/Token.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/Token.java Sat Feb 27 19:14:01 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();

Modified: lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/document/AbstractField.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/document/AbstractField.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/document/AbstractField.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/document/AbstractField.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/document/NumericField.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/document/NumericField.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/document/NumericField.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/document/NumericField.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/CheckIndex.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/CheckIndex.java Sat Feb 27 19:14:01 2010
@@ -899,7 +899,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/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/index/DocFieldConsumers.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldConsumers.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldConsumers.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldConsumers.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/index/FieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/FieldsReader.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/FieldsReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/FieldsReader.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/index/IndexReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexReader.java Sat Feb 27 19:14:01 2010
@@ -67,7 +67,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
@@ -428,8 +428,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/trunk/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/IndexWriter.java Sat Feb 27 19:14:01 2010
@@ -138,7 +138,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>

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/MultiReader.java Sat Feb 27 19:14:01 2010
@@ -48,7 +48,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) {
     initialize(subReaders, true);
@@ -61,7 +60,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) {
     initialize(subReaders, closeSubReaders);

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/Payload.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/Payload.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/Payload.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/Payload.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/index/ReusableStringReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/ReusableStringReader.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/ReusableStringReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/ReusableStringReader.java Sat Feb 27 19:14:01 2010
@@ -53,6 +53,6 @@
     }
   }
   @Override
-  public void close() {};
+  public void close() {}
 }
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfo.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfo.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfo.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfo.java Sat Feb 27 19:14:01 2010
@@ -318,7 +318,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/trunk/src/java/org/apache/lucene/index/SegmentInfos.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentInfos.java Sat Feb 27 19:14:01 2010
@@ -705,9 +705,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/trunk/src/java/org/apache/lucene/index/StoredFieldsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/StoredFieldsWriter.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/StoredFieldsWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/StoredFieldsWriter.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/index/TermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsReader.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsReader.java Sat Feb 27 19:14:01 2010
@@ -208,7 +208,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/trunk/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java Sat Feb 27 19:14:01 2010
@@ -151,8 +151,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
@@ -198,8 +196,8 @@
         tvd.writeVLong(pos-lastPos);
         lastPos = pos;
       }
-      perDoc.tvf.writeTo(tvf);
-      perDoc.tvf.reset();
+      perDoc.perDocTvf.writeTo(tvf);
+      perDoc.perDocTvf.reset();
       perDoc.numVectorFields = 0;
     }
 
@@ -252,14 +250,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;
     }
 
@@ -277,13 +275,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/trunk/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java Sat Feb 27 19:14:01 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;
 
@@ -114,7 +114,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
@@ -216,7 +216,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);
@@ -239,7 +239,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/trunk/src/java/org/apache/lucene/index/TermVectorsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsWriter.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsWriter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/TermVectorsWriter.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/index/TermsHash.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/TermsHash.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/TermsHash.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/TermsHash.java Sat Feb 27 19:14:01 2010
@@ -61,7 +61,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/trunk/src/java/org/apache/lucene/index/TermsHashPerField.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/TermsHashPerField.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/TermsHashPerField.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/TermsHashPerField.java Sat Feb 27 19:14:01 2010
@@ -351,7 +351,7 @@
     // term text into textStart address
 
     // Get the text of this term.
-    final char[] tokenText = termAtt.termBuffer();;
+    final char[] tokenText = termAtt.termBuffer();
     final int tokenTextLen = termAtt.termLength();
 
     // Compute hashcode & replace any invalid UTF16 sequences

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java Sat Feb 27 19:14:01 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/trunk/src/java/org/apache/lucene/search/FieldCache.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldCache.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldCache.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldCache.java Sat Feb 27 19:14:01 2010
@@ -501,7 +501,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/trunk/src/java/org/apache/lucene/search/FieldCacheImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheImpl.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheImpl.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheImpl.java Sat Feb 27 19:14:01 2010
@@ -296,7 +296,7 @@
       }
       return retArray;
     }
-  };
+  }
   
   // inherit javadocs
   public short[] getShorts (IndexReader reader, String field) throws IOException {
@@ -343,7 +343,7 @@
       }
       return retArray;
     }
-  };
+  }
   
   // inherit javadocs
   public int[] getInts (IndexReader reader, String field) throws IOException {
@@ -398,7 +398,7 @@
         retArray = new int[reader.maxDoc()];
       return retArray;
     }
-  };
+  }
 
 
   // inherit javadocs
@@ -456,7 +456,7 @@
         retArray = new float[reader.maxDoc()];
       return retArray;
     }
-  };
+  }
 
 
   public long[] getLongs(IndexReader reader, String field) throws IOException {
@@ -510,7 +510,7 @@
         retArray = new long[reader.maxDoc()];
       return retArray;
     }
-  };
+  }
 
   // inherit javadocs
   public double[] getDoubles(IndexReader reader, String field)
@@ -566,7 +566,7 @@
         retArray = new double[reader.maxDoc()];
       return retArray;
     }
-  };
+  }
 
   // inherit javadocs
   public String[] getStrings(IndexReader reader, String field)
@@ -602,7 +602,7 @@
       }
       return retArray;
     }
-  };
+  }
 
   // inherit javadocs
   public StringIndex getStringIndex(IndexReader reader, String field)
@@ -666,7 +666,7 @@
       StringIndex value = new StringIndex (retArray, mterms);
       return value;
     }
-  };
+  }
 
   private volatile PrintStream infoStream;
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java Sat Feb 27 19:14:01 2010
@@ -160,7 +160,7 @@
    * @param slot the value
    * @return value in this slot upgraded to Comparable
    */
-  public abstract Comparable value(int slot);
+  public abstract Comparable<?> value(int slot);
 
   /** Parses field's values as byte (using {@link
    *  FieldCache#getBytes} and sorts by ascending value */
@@ -203,7 +203,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Byte.valueOf(values[slot]);
     }
   }
@@ -249,7 +249,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Integer.valueOf(docIDs[slot]);
     }
   }
@@ -310,7 +310,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Double.valueOf(values[slot]);
     }
   }
@@ -375,7 +375,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Float.valueOf(values[slot]);
     }
   }
@@ -444,7 +444,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Integer.valueOf(values[slot]);
     }
   }
@@ -509,7 +509,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Long.valueOf(values[slot]);
     }
   }
@@ -564,7 +564,7 @@
     }
     
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Float.valueOf(scores[slot]);
     }
   }
@@ -610,7 +610,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return Short.valueOf(values[slot]);
     }
   }
@@ -676,7 +676,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return values[slot];
     }
   }
@@ -825,7 +825,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return values[slot];
     }
 
@@ -904,7 +904,7 @@
     }
 
     @Override
-    public Comparable value(int slot) {
+    public Comparable<?> value(int slot) {
       return values[slot];
     }
   }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java Sat Feb 27 19:14:01 2010
@@ -203,7 +203,7 @@
    */
   FieldDoc fillFields(final Entry entry) {
     final int n = comparators.length;
-    final Comparable[] fields = new Comparable[n];
+    final Comparable<?>[] fields = new Comparable[n];
     for (int i = 0; i < n; ++i) {
       fields[i] = comparators[i].value(entry.slot);
     }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java Sat Feb 27 19:14:01 2010
@@ -45,7 +45,7 @@
    * Validation method to determine whether a docid should be in the result set.
    * @param doc docid to be tested
    * @return true if input docid should be in the result set, false otherwise.
-   * @see #FilteredDocIdSetIterator(DocIdSetIterator).
+   * @see #FilteredDocIdSetIterator(DocIdSetIterator)
    */
   abstract protected boolean match(int doc) throws IOException;
 	

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/IndexSearcher.java Sat Feb 27 19:14:01 2010
@@ -36,8 +36,8 @@
  * or {@link #search(Query,Filter,int)} methods. For performance reasons it is 
  * recommended to open only one IndexSearcher and use it for all of your searches.
  * 
- * <a name="thread-safety"></a><p><b>NOTE</b>: {@link
- * <code>IndexSearcher</code>} instances are completely
+ * <a name="thread-safety"></a><p><b>NOTE</b>: <code>{@link
+ * IndexSearcher}</code> 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>
@@ -55,9 +55,9 @@
 
   /** Creates a searcher searching the index in the named
    *  directory, with readOnly=true
+   * @param path directory where IndexReader will be opened
    * @throws CorruptIndexException if the index is corrupt
    * @throws IOException if there is a low-level IO error
-   * @param path directory where IndexReader will be opened
    */
   public IndexSearcher(Directory path) throws CorruptIndexException, IOException {
     this(IndexReader.open(path, true), true);
@@ -68,11 +68,11 @@
    *  gives much better concurrent performance, unless you
    *  intend to do write operations (delete documents or
    *  change norms) with the underlying IndexReader.
-   * @throws CorruptIndexException if the index is corrupt
-   * @throws IOException if there is a low-level IO error
    * @param path directory where IndexReader will be opened
    * @param readOnly if true, the underlying IndexReader
    * will be opened readOnly
+   * @throws CorruptIndexException if the index is corrupt
+   * @throws IOException if there is a low-level IO error
    */
   public IndexSearcher(Directory path, boolean readOnly) throws CorruptIndexException, IOException {
     this(IndexReader.open(path, readOnly), true);

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java Sat Feb 27 19:14:01 2010
@@ -95,7 +95,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.
    * @return The score of the required scorer.
    */
   @Override

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java Sat Feb 27 19:14:01 2010
@@ -59,7 +59,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.
    * @return The score of the required scorer, eventually increased by the score
    * of the optional scorer when it also matches the current document.
    */

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/Similarity.java Sat Feb 27 19:14:01 2010
@@ -402,7 +402,7 @@
  *
  *      The sum of squared weights (of the query terms) is
  *      computed by the query {@link org.apache.lucene.search.Weight} object.
- *      For example, a {@link org.apache.lucene.search.BooleanQuery boolean query}
+ *      For example, a {@link org.apache.lucene.search.BooleanQuery}
  *      computes this value as:
  *
  *      <br>&nbsp;<br>
@@ -609,7 +609,7 @@
    * @return the calculated float norm
    */
   public float computeNorm(String field, FieldInvertState state) {
-    return (float) (state.getBoost() * lengthNorm(field, state.getLength()));
+    return (state.getBoost() * lengthNorm(field, state.getLength()));
   }
   
   /** Computes the normalization value for a field given the total number of

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/ByteFieldSource.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/ByteFieldSource.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/ByteFieldSource.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/ByteFieldSource.java Sat Feb 27 19:14:01 2010
@@ -39,10 +39,7 @@
  * composite (multi-segment) reader, this can easily cause
  * double RAM usage for the values in the FieldCache.  It's
  * best to switch your application to pass only atomic
- * (single segment) readers to this API.  Alternatively, for
- * a short-term fix, you could wrap your ValueSource using
- * {@link MultiValueSource}, which costs more CPU per lookup
- * but will not consume double the FieldCache RAM.</p>
+ * (single segment) readers to this API.</p>
  */
 public class ByteFieldSource extends FieldCacheSource {
   private FieldCache.ByteParser parser;
@@ -76,7 +73,7 @@
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#floatVal(int) */
       @Override
       public float floatVal(int doc) { 
-        return (float) arr[doc]; 
+        return arr[doc]; 
       }
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#intVal(int) */
       @Override

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreProvider.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreProvider.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreProvider.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreProvider.java Sat Feb 27 19:14:01 2010
@@ -20,7 +20,6 @@
 import java.io.IOException;
 
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.search.ComplexExplanation;
 import org.apache.lucene.search.Explanation;
 import org.apache.lucene.search.FieldCache; // for javadocs
 

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java Sat Feb 27 19:14:01 2010
@@ -294,7 +294,6 @@
     private final float qWeight;
     private Scorer subQueryScorer;
     private Scorer[] valSrcScorers;
-    private IndexReader reader;
     private final CustomScoreProvider provider;
     private float vScores[]; // reused in score() to avoid allocating this array for each doc 
 
@@ -305,7 +304,6 @@
       this.qWeight = w.getValue();
       this.subQueryScorer = subQueryScorer;
       this.valSrcScorers = valSrcScorers;
-      this.reader = reader;
       this.vScores = new float[valSrcScorers.length];
       this.provider = CustomScoreQuery.this.getCustomScoreProvider(reader);
     }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/DocValues.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/DocValues.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/DocValues.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/DocValues.java Sat Feb 27 19:14:01 2010
@@ -70,7 +70,7 @@
    * @param doc document whose double value is requested.
    */
   public double doubleVal(int doc) {
-    return (double) floatVal(doc);
+    return floatVal(doc);
   }
   
   /**

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/FloatFieldSource.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/FloatFieldSource.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/FloatFieldSource.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/FloatFieldSource.java Sat Feb 27 19:14:01 2010
@@ -39,10 +39,7 @@
  * composite (multi-segment) reader, this can easily cause
  * double RAM usage for the values in the FieldCache.  It's
  * best to switch your application to pass only atomic
- * (single segment) readers to this API.  Alternatively, for
- * a short-term fix, you could wrap your ValueSource using
- * {@link MultiValueSource}, which costs more CPU per lookup
- * but will not consume double the FieldCache RAM.</p>
+ * (single segment) readers to this API.</p>
  */
 public class FloatFieldSource extends FieldCacheSource {
   private FieldCache.FloatParser parser;

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/IntFieldSource.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/IntFieldSource.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/IntFieldSource.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/IntFieldSource.java Sat Feb 27 19:14:01 2010
@@ -39,10 +39,7 @@
  * composite (multi-segment) reader, this can easily cause
  * double RAM usage for the values in the FieldCache.  It's
  * best to switch your application to pass only atomic
- * (single segment) readers to this API.  Alternatively, for
- * a short-term fix, you could wrap your ValueSource using
- * {@link MultiValueSource}, which costs more CPU per lookup
- * but will not consume double the FieldCache RAM.</p>
+ * (single segment) readers to this API.</p>
  */
 public class IntFieldSource extends FieldCacheSource {
   private FieldCache.IntParser parser;
@@ -76,7 +73,7 @@
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#floatVal(int) */
       @Override
       public float floatVal(int doc) { 
-        return (float) arr[doc]; 
+        return arr[doc]; 
       }
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#intVal(int) */
       @Override

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/OrdFieldSource.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/OrdFieldSource.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/OrdFieldSource.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/OrdFieldSource.java Sat Feb 27 19:14:01 2010
@@ -74,7 +74,7 @@
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#floatVal(int) */
       @Override
       public float floatVal(int doc) {
-        return (float)arr[doc];
+        return arr[doc];
       }
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#strVal(int) */
       @Override

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/ReverseOrdFieldSource.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/ReverseOrdFieldSource.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/ReverseOrdFieldSource.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/ReverseOrdFieldSource.java Sat Feb 27 19:14:01 2010
@@ -79,7 +79,7 @@
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#floatVal(int) */
       @Override
       public float floatVal(int doc) {
-        return (float)(end - arr[doc]);
+        return (end - arr[doc]);
       }
       /* (non-Javadoc) @see org.apache.lucene.search.function.DocValues#intVal(int) */
       @Override

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/ShortFieldSource.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/ShortFieldSource.java?rev=917019&r1=917018&r2=917019&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/ShortFieldSource.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/ShortFieldSource.java Sat Feb 27 19:14:01 2010
@@ -39,10 +39,7 @@
  * composite (multi-segment) reader, this can easily cause
  * double RAM usage for the values in the FieldCache.  It's
  * best to switch your application to pass only atomic
- * (single segment) readers to this API.  Alternatively, for
- * a short-term fix, you could wrap your ValueSource using
- * {@link MultiValueSource}, which costs more CPU per lookup
- * but will not consume double the FieldCache RAM.</p>
+ * (single segment) readers to this API.</p>
  */
 public class ShortFieldSource extends FieldCacheSource {
   private FieldCache.ShortParser parser;
@@ -76,7 +73,7 @@
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#floatVal(int) */
       @Override
       public float floatVal(int doc) { 
-        return (float) arr[doc];
+        return arr[doc];
       }
       /*(non-Javadoc) @see org.apache.lucene.search.function.DocValues#intVal(int) */
       @Override



Mime
View raw message