lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1307012 - in /lucene/dev/trunk: dev-tools/eclipse/ lucene/core/src/java/org/apache/lucene/analysis/ lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/ lucene/core/src/java/org/apache/lucene/codecs/ lucene/core/src/java/org/ap...
Date Thu, 29 Mar 2012 17:34:36 GMT
Author: ryan
Date: Thu Mar 29 17:34:34 2012
New Revision: 1307012

URL: http://svn.apache.org/viewvc?rev=1307012&view=rev
Log:
LUCENE-2000: remove redundant casts

Modified:
    lucene/dev/trunk/dev-tools/eclipse/dot.classpath
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/Token.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTermsReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTreeTermsReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/SegmentTermEnum.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReaderIndex.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepPostingsReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ReadersAndLiveDocs.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/StandardDirectoryReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestFieldInfos.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java
    lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java
    lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PrefixAwareTokenFilter.java
    lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/SingleTokenTokenStream.java
    lucene/dev/trunk/modules/analysis/common/src/test/org/apache/lucene/analysis/util/TestCharArrayIterator.java
    lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/LaoBreakIterator.java
    lucene/dev/trunk/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestCharArrayIterator.java
    lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/demohtml/HTMLParserTokenManager.java
    lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java
    lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java
    lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java
    lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java
    lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java
    lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/index/attributes/CategoryAttributeImpl.java
    lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/search/params/FacetRequest.java
    lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/util/ScoredDocIdsUtils.java
    lucene/dev/trunk/modules/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java
    lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java
    lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
    lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/BoostingQuery.java
    lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
    lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.java
    lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParserTokenManager.java
    lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/OpenRangeQueryNodeProcessor.java
    lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParserTokenManager.java
    lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MaxFieldValueUpdateProcessorFactory.java
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MinFieldValueUpdateProcessorFactory.java
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/ConcurrentLRUCache.java
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java

Modified: lucene/dev/trunk/dev-tools/eclipse/dot.classpath
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/eclipse/dot.classpath?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/eclipse/dot.classpath (original)
+++ lucene/dev/trunk/dev-tools/eclipse/dot.classpath Thu Mar 29 17:34:34 2012
@@ -39,7 +39,7 @@
 	<classpathentry kind="src" path="modules/analysis/uima/src/test"/>
 	<classpathentry kind="src" path="modules/benchmark/src/java"/>
 	<classpathentry kind="src" path="modules/benchmark/src/test"/>
-	<classpathentry excluding="src" including="conf/**" kind="src" path="modules/benchmark"/>
+	<classpathentry kind="src" path="modules/benchmark/conf"/>
 	<classpathentry kind="src" path="modules/facet/src/java"/>
 	<classpathentry kind="src" path="modules/facet/src/examples"/>
 	<classpathentry kind="src" path="modules/facet/src/test"/>
@@ -169,8 +169,8 @@
 	<classpathentry kind="lib" path="solr/contrib/uima/lib/uimaj-core-2.3.1.jar"/>
 	<classpathentry kind="lib" path="solr/contrib/velocity/lib/velocity-1.6.4.jar"/>
 	<classpathentry kind="lib" path="solr/contrib/velocity/lib/velocity-tools-2.0.jar"/>
-        <classpathentry kind="lib" path="solr/contrib/velocity/lib/commons-beanutils-1.7.0.jar"/>
-        <classpathentry kind="lib" path="solr/contrib/velocity/lib/commons-collections-3.2.1.jar"/>
+  <classpathentry kind="lib" path="solr/contrib/velocity/lib/commons-beanutils-1.7.0.jar"/>
+  <classpathentry kind="lib" path="solr/contrib/velocity/lib/commons-collections-3.2.1.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/Token.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/Token.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/Token.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/Token.java Thu Mar 29 17:34:34 2012
@@ -370,7 +370,7 @@ public class Token extends CharTermAttri
     Token t = (Token)super.clone();
     // Do a deep clone
     if (payload != null) {
-      t.payload = (Payload) payload.clone();
+      t.payload = payload.clone();
     }
     return t;
   }
@@ -386,7 +386,7 @@ public class Token extends CharTermAttri
     t.flags = flags;
     t.type = type;
     if (payload != null)
-      t.payload = (Payload) payload.clone();
+      t.payload = payload.clone();
     return t;
   }
 
@@ -577,13 +577,13 @@ public class Token extends CharTermAttri
       to.reinit(this);
       // reinit shares the payload, so clone it:
       if (payload !=null) {
-        to.payload = (Payload) payload.clone();
+        to.payload = payload.clone();
       }
     } else {
       super.copyTo(target);
       ((OffsetAttribute) target).setOffset(startOffset, endOffset);
       ((PositionIncrementAttribute) target).setPositionIncrement(positionIncrement);
-      ((PayloadAttribute) target).setPayload((payload == null) ? null : (Payload) payload.clone());
+      ((PayloadAttribute) target).setPayload((payload == null) ? null : payload.clone());
       ((FlagsAttribute) target).setFlags(flags);
       ((TypeAttribute) target).setType(type);
     }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java Thu Mar 29 17:34:34 2012
@@ -61,7 +61,7 @@ public class PayloadAttributeImpl extend
   public PayloadAttributeImpl clone()  {
     PayloadAttributeImpl clone = (PayloadAttributeImpl) super.clone();
     if (payload != null) {
-      clone.payload = (Payload) payload.clone();
+      clone.payload = payload.clone();
     }
     return clone;
   }
@@ -92,7 +92,7 @@ public class PayloadAttributeImpl extend
   @Override
   public void copyTo(AttributeImpl target) {
     PayloadAttribute t = (PayloadAttribute) target;
-    t.setPayload((payload == null) ? null : (Payload) payload.clone());
+    t.setPayload((payload == null) ? null : payload.clone());
   }  
 
   

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTermsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTermsReader.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTermsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTermsReader.java Thu Mar 29 17:34:34 2012
@@ -729,7 +729,7 @@ public class BlockTermsReader extends Fi
       public TermState termState() throws IOException {
         //System.out.println("BTR.termState this=" + this);
         decodeMetaData();
-        TermState ts = (TermState) state.clone();
+        TermState ts = state.clone();
         //System.out.println("  return ts=" + ts);
         return ts;
       }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTreeTermsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTreeTermsReader.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTreeTermsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/BlockTreeTermsReader.java Thu Mar 29 17:34:34 2012
@@ -803,7 +803,7 @@ public class BlockTreeTermsReader extend
       @Override
       public TermState termState() throws IOException {
         currentFrame.decodeMetaData();
-        return (TermState) currentFrame.termState.clone();
+        return currentFrame.termState.clone();
       }
 
       private Frame getFrame(int ord) throws IOException {
@@ -2166,7 +2166,7 @@ public class BlockTreeTermsReader extend
       public TermState termState() throws IOException {
         assert !eof;
         currentFrame.decodeMetaData();
-        TermState ts = (TermState) currentFrame.state.clone();
+        TermState ts = currentFrame.state.clone();
         //if (DEBUG) System.out.println("BTTR.termState seg=" + segment + " state=" + ts);
         return ts;
       }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/SegmentTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/SegmentTermEnum.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/SegmentTermEnum.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/SegmentTermEnum.java Thu Mar 29 17:34:34 2012
@@ -109,8 +109,8 @@ final class SegmentTermEnum implements C
     clone.input = (IndexInput) input.clone();
     clone.termInfo = new TermInfo(termInfo);
 
-    clone.termBuffer = (TermBuffer)termBuffer.clone();
-    clone.prevBuffer = (TermBuffer)prevBuffer.clone();
+    clone.termBuffer = termBuffer.clone();
+    clone.prevBuffer = prevBuffer.clone();
     clone.scanBuffer = new TermBuffer();
 
     return clone;

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReader.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReader.java Thu Mar 29 17:34:34 2012
@@ -340,12 +340,12 @@ final class TermInfosReader {
 
   /** Returns an enumeration of all the Terms and TermInfos in the set. */
   public SegmentTermEnum terms() {
-    return (SegmentTermEnum)origEnum.clone();
+    return origEnum.clone();
   }
 
   /** Returns an enumeration of terms starting at or after the named term. */
   public SegmentTermEnum terms(Term term) throws IOException {
     get(term, true);
-    return (SegmentTermEnum)getThreadResources().termEnum.clone();
+    return getThreadResources().termEnum.clone();
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReaderIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReaderIndex.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReaderIndex.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene3x/TermInfosReaderIndex.java Thu Mar 29 17:34:34 2012
@@ -116,7 +116,7 @@ class TermInfosReaderIndex {
   }
 
   void seekEnum(SegmentTermEnum enumerator, int indexOffset) throws IOException {
-    PagedBytesDataInput input = (PagedBytesDataInput) dataInput.clone();
+    PagedBytesDataInput input = dataInput.clone();
     
     input.setPosition(indexToDataOffset.get(indexOffset));
 
@@ -152,7 +152,7 @@ class TermInfosReaderIndex {
   int getIndexOffset(Term term) throws IOException {
     int lo = 0;
     int hi = indexSize - 1;
-    PagedBytesDataInput input = (PagedBytesDataInput) dataInput.clone();
+    PagedBytesDataInput input = dataInput.clone();
     BytesRef scratch = new BytesRef();
     while (hi >= lo) {
       int mid = (lo + hi) >>> 1;
@@ -176,7 +176,7 @@ class TermInfosReaderIndex {
    * @throws IOException
    */
   Term getTerm(int termIndex) throws IOException {
-    PagedBytesDataInput input = (PagedBytesDataInput) dataInput.clone();
+    PagedBytesDataInput input = dataInput.clone();
     input.setPosition(indexToDataOffset.get(termIndex));
 
     // read the term
@@ -206,7 +206,7 @@ class TermInfosReaderIndex {
    * @throws IOException 
    */
   int compareTo(Term term, int termIndex) throws IOException {
-    return compareTo(term, termIndex, (PagedBytesDataInput) dataInput.clone(), new BytesRef());
+    return compareTo(term, termIndex, dataInput.clone(), new BytesRef());
   }
 
   /**

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepPostingsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepPostingsReader.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepPostingsReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/sep/SepPostingsReader.java Thu Mar 29 17:34:34 2012
@@ -172,13 +172,13 @@ public class SepPostingsReader extends P
       super.copyFrom(_other);
       SepTermState other = (SepTermState) _other;
       if (docIndex == null) {
-        docIndex = (IntIndexInput.Index) other.docIndex.clone();
+        docIndex = other.docIndex.clone();
       } else {
         docIndex.set(other.docIndex);
       }
       if (other.freqIndex != null) {
         if (freqIndex == null) {
-          freqIndex = (IntIndexInput.Index) other.freqIndex.clone();
+          freqIndex = other.freqIndex.clone();
         } else {
           freqIndex.set(other.freqIndex);
         }
@@ -187,7 +187,7 @@ public class SepPostingsReader extends P
       }
       if (other.posIndex != null) {
         if (posIndex == null) {
-          posIndex = (IntIndexInput.Index) other.posIndex.clone();
+          posIndex = other.posIndex.clone();
         } else {
           posIndex.set(other.posIndex);
         }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java Thu Mar 29 17:34:34 2012
@@ -475,7 +475,7 @@ public class CheckIndex {
     }
 
 
-    result.newSegments = (SegmentInfos) sis.clone();
+    result.newSegments = sis.clone();
     result.newSegments.clear();
     result.maxSegmentName = -1;
 
@@ -642,7 +642,7 @@ public class CheckIndex {
       }
 
       // Keeper
-      result.newSegments.add((SegmentInfo) info.clone());
+      result.newSegments.add(info.clone());
     }
 
     if (0 == result.numBadSegments) {

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java Thu Mar 29 17:34:34 2012
@@ -169,7 +169,7 @@ public final class FieldInfos implements
     fis.hasProx = hasProx;
     fis.hasVectors = hasVectors;
     for (FieldInfo fi : this) {
-      FieldInfo clone = (FieldInfo) (fi).clone();
+      FieldInfo clone = fi.clone();
       fis.putInternal(clone);
     }
     return fis;
@@ -444,7 +444,7 @@ public final class FieldInfos implements
     }
     final FieldInfos roFis = new FieldInfos((FieldNumberBiMap)null);
     for (FieldInfo fieldInfo : this) {
-      FieldInfo clone = (FieldInfo) (fieldInfo).clone();
+      FieldInfo clone = fieldInfo.clone();
       roFis.putInternal(clone);
       roFis.hasVectors |= clone.storeTermVector;
       roFis.hasProx |= clone.isIndexed && clone.indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0;

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexUpgrader.java Thu Mar 29 17:34:34 2012
@@ -145,7 +145,7 @@ public final class IndexUpgrader {
       }
     }
     
-    final IndexWriterConfig c = (IndexWriterConfig) iwc.clone();
+    final IndexWriterConfig c = iwc.clone();
     c.setMergePolicy(new UpgradeIndexMergePolicy(c.getMergePolicy()));
     c.setIndexDeletionPolicy(new KeepOnlyLastCommitDeletionPolicy());
     

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java Thu Mar 29 17:34:34 2012
@@ -585,7 +585,7 @@ public class IndexWriter implements Clos
    */
   public IndexWriter(Directory d, IndexWriterConfig conf)
       throws CorruptIndexException, LockObtainFailedException, IOException {
-    config = (IndexWriterConfig) conf.clone();
+    config = conf.clone();
     directory = d;
     analyzer = conf.getAnalyzer();
     infoStream = conf.getInfoStream();
@@ -2431,7 +2431,7 @@ public class IndexWriter implements Clos
             // no partial changes (eg a delete w/o
             // corresponding add from an updateDocument) can
             // sneak into the commit point:
-            toCommit = (SegmentInfos) segmentInfos.clone();
+            toCommit = segmentInfos.clone();
 
             pendingCommitChangeCount = changeCount;
 

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ReadersAndLiveDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ReadersAndLiveDocs.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ReadersAndLiveDocs.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/ReadersAndLiveDocs.java Thu Mar 29 17:34:34 2012
@@ -273,7 +273,7 @@ class ReadersAndLiveDocs {
       assert liveDocs.length() == info.docCount;
 
       // Save in case we need to rollback on failure:
-      final SegmentInfo sav = (SegmentInfo) info.clone();
+      final SegmentInfo sav = info.clone();
       info.advanceDelGen();
       info.setDelCount(info.getDelCount() + pendingDeleteCount);
 

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfo.java Thu Mar 29 17:34:34 2012
@@ -142,7 +142,7 @@ public final class SegmentInfo implement
     docStoreIsCompoundFile = src.docStoreIsCompoundFile;
     hasVectors = src.hasVectors;
     hasProx = src.hasProx;
-    fieldInfos = src.fieldInfos == null ? null : (FieldInfos) src.fieldInfos.clone();
+    fieldInfos = src.fieldInfos == null ? null : src.fieldInfos.clone();
     if (src.normGen == null) {
       normGen = null;
     } else {
@@ -254,7 +254,7 @@ public final class SegmentInfo implement
   @Override
   public SegmentInfo clone() {
     final SegmentInfo si = new SegmentInfo(name, docCount, dir, isCompoundFile, codec,
-        fieldInfos == null ? null : (FieldInfos) fieldInfos.clone());
+        fieldInfos == null ? null : fieldInfos.clone());
     si.docStoreOffset = docStoreOffset;
     si.docStoreSegment = docStoreSegment;
     si.docStoreIsCompoundFile = docStoreIsCompoundFile;

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java Thu Mar 29 17:34:34 2012
@@ -385,7 +385,7 @@ public final class SegmentInfos implemen
       for(final SegmentInfo info : this) {
         assert info.getCodec() != null;
         // dont directly access segments, use add method!!!
-        sis.add((SegmentInfo) info.clone());
+        sis.add(info.clone());
       }
       sis.userData = new HashMap<String,String>(userData);
       return sis;
@@ -957,7 +957,7 @@ public final class SegmentInfos implemen
       final List<SegmentInfo> list = new ArrayList<SegmentInfo>(size());
       for(final SegmentInfo info : this) {
         assert info.getCodec() != null;
-        list.add((SegmentInfo) info.clone());
+        list.add(info.clone());
       }
       return list;
     } else {

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/StandardDirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/StandardDirectoryReader.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/StandardDirectoryReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/StandardDirectoryReader.java Thu Mar 29 17:34:34 2012
@@ -83,7 +83,7 @@ final class StandardDirectoryReader exte
     List<SegmentReader> readers = new ArrayList<SegmentReader>();
     final Directory dir = writer.getDirectory();
 
-    final SegmentInfos segmentInfos = (SegmentInfos) infos.clone();
+    final SegmentInfos segmentInfos = infos.clone();
     int infosUpto = 0;
     for (int i=0;i<numSegments;i++) {
       IOException prior = null;

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java Thu Mar 29 17:34:34 2012
@@ -433,7 +433,7 @@ public class BooleanQuery extends Query 
 
         if (getBoost() != 1.0f) {                 // incorporate boost
           if (query == c.getQuery()) {                   // if rewrite was no-op
-            query = (Query)query.clone();         // then clone before boost
+            query = query.clone();         // then clone before boost
           }
           // Since the BooleanQuery only has 1 clause, the BooleanQuery will be
           // written out. Therefore the rewritten Query's boost must incorporate both

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java Thu Mar 29 17:34:34 2012
@@ -190,7 +190,7 @@ public class DisjunctionMaxQuery extends
       Query singleton = disjuncts.get(0);
       Query result = singleton.rewrite(reader);
       if (getBoost() != 1.0f) {
-        if (result == singleton) result = (Query)result.clone();
+        if (result == singleton) result = result.clone();
         result.setBoost(getBoost() * result.getBoost());
       }
       return result;

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/AttributeSource.java Thu Mar 29 17:34:34 2012
@@ -334,7 +334,7 @@ public class AttributeSource {
    */
   public final State captureState() {
     final State state = this.getCurrentState();
-    return (state == null) ? null : (State) state.clone();
+    return (state == null) ? null : state.clone();
   }
   
   /**
@@ -466,7 +466,7 @@ public class AttributeSource {
     if (hasAttributes()) {
       // first clone the impls
       for (State state = getCurrentState(); state != null; state = state.next) {
-        clone.attributeImpls.put(state.attribute.getClass(), (AttributeImpl) state.attribute.clone());
+        clone.attributeImpls.put(state.attribute.getClass(), state.attribute.clone());
       }
       
       // now the interfaces

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java Thu Mar 29 17:34:34 2012
@@ -255,7 +255,7 @@ public class TestCodecs extends LuceneTe
     final FieldData[] fields = new FieldData[] {field};
 
     final Directory dir = newDirectory();
-    FieldInfos clonedFieldInfos = (FieldInfos) fieldInfos.clone();
+    FieldInfos clonedFieldInfos = fieldInfos.clone();
     this.write(fieldInfos, dir, fields, true);
     Codec codec = Codec.getDefault();
     final SegmentInfo si = new SegmentInfo(SEGMENT, 10000, dir, false, codec, clonedFieldInfos);
@@ -311,7 +311,7 @@ public class TestCodecs extends LuceneTe
       System.out.println("TEST: now write postings");
     }
 
-    FieldInfos clonedFieldInfos = (FieldInfos) fieldInfos.clone();
+    FieldInfos clonedFieldInfos = fieldInfos.clone();
     this.write(fieldInfos, dir, fields, false);
     Codec codec = Codec.getDefault();
     final SegmentInfo si = new SegmentInfo(SEGMENT, 10000, dir, false, codec, clonedFieldInfos);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestFieldInfos.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestFieldInfos.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestFieldInfos.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestFieldInfos.java Thu Mar 29 17:34:34 2012
@@ -102,7 +102,7 @@ public class TestFieldInfos extends Luce
     FieldInfos fieldInfos = createAndWriteFieldInfos(dir, name);
     FieldInfos readOnly = readFieldInfos(dir, name);
     assertReadOnly(readOnly, fieldInfos);
-    FieldInfos readOnlyClone = (FieldInfos)readOnly.clone();
+    FieldInfos readOnlyClone = readOnly.clone();
     assertNotSame(readOnly, readOnlyClone);
     // clone is also read only - no global field map
     assertReadOnly(readOnlyClone, fieldInfos);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterConfig.java Thu Mar 29 17:34:34 2012
@@ -156,7 +156,7 @@ public class TestIndexWriterConfig exten
   @Test
   public void testClone() throws Exception {
     IndexWriterConfig conf = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random));
-    IndexWriterConfig clone = (IndexWriterConfig) conf.clone();
+    IndexWriterConfig clone = conf.clone();
 
     // Clone is shallow since not all parameters are cloneable.
     assertTrue(conf.getIndexDeletionPolicy() == clone.getIndexDeletionPolicy());

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanQuery.java Thu Mar 29 17:34:34 2012
@@ -94,7 +94,7 @@ public class TestBooleanQuery extends Lu
     assertEquals(score*.5F, score2, 1e-6);
 
     // LUCENE-2617: make sure that a clause not in the index still contributes to the score via coord factor
-    BooleanQuery qq = (BooleanQuery)q.clone();
+    BooleanQuery qq = q.clone();
     PhraseQuery phrase = new PhraseQuery();
     phrase.add(new Term("field", "not_in_index"));
     phrase.add(new Term("field", "another_not_in_index"));

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/util/TestFixedBitSet.java Thu Mar 29 17:34:34 2012
@@ -139,14 +139,14 @@ public class TestFixedBitSet extends Luc
       fromIndex = random.nextInt(sz/2);
       toIndex = fromIndex + random.nextInt(sz - fromIndex);
       BitSet aa = (BitSet)a.clone(); aa.flip(fromIndex,toIndex);
-      FixedBitSet bb = (FixedBitSet)b.clone(); bb.flip(fromIndex,toIndex);
+      FixedBitSet bb = b.clone(); bb.flip(fromIndex,toIndex);
 
       doIterate(aa,bb, mode);   // a problem here is from flip or doIterate
 
       fromIndex = random.nextInt(sz/2);
       toIndex = fromIndex + random.nextInt(sz - fromIndex);
       aa = (BitSet)a.clone(); aa.clear(fromIndex,toIndex);
-      bb = (FixedBitSet)b.clone(); bb.clear(fromIndex,toIndex);
+      bb = b.clone(); bb.clear(fromIndex,toIndex);
 
       doNextSetBit(aa,bb); // a problem here is from clear() or nextSetBit
       
@@ -155,7 +155,7 @@ public class TestFixedBitSet extends Luc
       fromIndex = random.nextInt(sz/2);
       toIndex = fromIndex + random.nextInt(sz - fromIndex);
       aa = (BitSet)a.clone(); aa.set(fromIndex,toIndex);
-      bb = (FixedBitSet)b.clone(); bb.set(fromIndex,toIndex);
+      bb = b.clone(); bb.set(fromIndex,toIndex);
 
       doNextSetBit(aa,bb); // a problem here is from set() or nextSetBit
     
@@ -168,9 +168,9 @@ public class TestFixedBitSet extends Luc
         BitSet a_or = (BitSet)a.clone(); a_or.or(a0);
         BitSet a_andn = (BitSet)a.clone(); a_andn.andNot(a0);
 
-        FixedBitSet b_and = (FixedBitSet)b.clone(); assertEquals(b,b_and); b_and.and(b0);
-        FixedBitSet b_or = (FixedBitSet)b.clone(); b_or.or(b0);
-        FixedBitSet b_andn = (FixedBitSet)b.clone(); b_andn.andNot(b0);
+        FixedBitSet b_and = b.clone(); assertEquals(b,b_and); b_and.and(b0);
+        FixedBitSet b_or = b.clone(); b_or.or(b0);
+        FixedBitSet b_andn = b.clone(); b_andn.andNot(b0);
 
         assertEquals(a0.cardinality(), b0.cardinality());
         assertEquals(a_or.cardinality(), b_or.cardinality());

Modified: lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java Thu Mar 29 17:34:34 2012
@@ -354,7 +354,7 @@ public class TernaryTree implements Clon
     t.hi = this.hi.clone();
     t.eq = this.eq.clone();
     t.sc = this.sc.clone();
-    t.kv = (CharVector) this.kv.clone();
+    t.kv = this.kv.clone();
     t.root = this.root;
     t.freenode = this.freenode;
     t.length = this.length;
@@ -556,11 +556,11 @@ public class TernaryTree implements Clon
           case 1:
             if (sc[i.parent] != 0) {
               res = eq[i.parent];
-              ns.push((Item) i.clone());
+              ns.push(i.clone());
               ks.append(sc[i.parent]);
             } else {
               i.child++;
-              ns.push((Item) i.clone());
+              ns.push(i.clone());
               res = hi[i.parent];
             }
             climb = false;
@@ -568,7 +568,7 @@ public class TernaryTree implements Clon
 
           case 2:
             res = hi[i.parent];
-            ns.push((Item) i.clone());
+            ns.push(i.clone());
             if (ks.length() > 0) {
               ks.setLength(ks.length() - 1); // pop
             }

Modified: lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PrefixAwareTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PrefixAwareTokenFilter.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PrefixAwareTokenFilter.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/PrefixAwareTokenFilter.java Thu Mar 29 17:34:34 2012
@@ -95,7 +95,7 @@ public class PrefixAwareTokenFilter exte
         // Make it a deep copy
         Payload p = previousPrefixToken.getPayload();
         if (p != null) {
-          previousPrefixToken.setPayload((Payload) p.clone());
+          previousPrefixToken.setPayload(p.clone());
         }
         setCurrentToken(nextToken);
         return true;

Modified: lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/SingleTokenTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/SingleTokenTokenStream.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/SingleTokenTokenStream.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/SingleTokenTokenStream.java Thu Mar 29 17:34:34 2012
@@ -39,7 +39,7 @@ public final class SingleTokenTokenStrea
     super(Token.TOKEN_ATTRIBUTE_FACTORY);
     
     assert token != null;
-    this.singleToken = (Token) token.clone();
+    this.singleToken = token.clone();
     
     tokenAtt = (AttributeImpl) addAttribute(CharTermAttribute.class);
     assert (tokenAtt instanceof Token);
@@ -63,10 +63,10 @@ public final class SingleTokenTokenStrea
   }
 
   public Token getToken() {
-    return (Token) singleToken.clone();
+    return singleToken.clone();
   }
 
   public void setToken(Token token) {
-    this.singleToken = (Token) token.clone();
+    this.singleToken = token.clone();
   }
 }

Modified: lucene/dev/trunk/modules/analysis/common/src/test/org/apache/lucene/analysis/util/TestCharArrayIterator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/test/org/apache/lucene/analysis/util/TestCharArrayIterator.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/common/src/test/org/apache/lucene/analysis/util/TestCharArrayIterator.java (original)
+++ lucene/dev/trunk/modules/analysis/common/src/test/org/apache/lucene/analysis/util/TestCharArrayIterator.java Thu Mar 29 17:34:34 2012
@@ -148,7 +148,7 @@ public class TestCharArrayIterator exten
     char text[] = "testing".toCharArray();
     ci.setText(text, 0, text.length);
     ci.next();
-    CharArrayIterator ci2 = (CharArrayIterator) ci.clone();
+    CharArrayIterator ci2 = ci.clone();
     assertEquals(ci.getIndex(), ci2.getIndex());
     assertEquals(ci.next(), ci2.next());
     assertEquals(ci.last(), ci2.last());

Modified: lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/LaoBreakIterator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/LaoBreakIterator.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/LaoBreakIterator.java (original)
+++ lucene/dev/trunk/modules/analysis/icu/src/java/org/apache/lucene/analysis/icu/segmentation/LaoBreakIterator.java Thu Mar 29 17:34:34 2012
@@ -216,11 +216,11 @@ public class LaoBreakIterator extends Br
     other.rules = (RuleBasedBreakIterator) rules.clone();
     other.verify = (RuleBasedBreakIterator) verify.clone();
     if (text != null)
-      other.text = (CharArrayIterator) text.clone();
+      other.text = text.clone();
     if (working != null)
-      other.working = (CharArrayIterator) working.clone();
+      other.working = working.clone();
     if (verifyText != null)
-      other.verifyText = (CharArrayIterator) verifyText.clone();
+      other.verifyText = verifyText.clone();
     return other;
   }
 }

Modified: lucene/dev/trunk/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestCharArrayIterator.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestCharArrayIterator.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestCharArrayIterator.java (original)
+++ lucene/dev/trunk/modules/analysis/icu/src/test/org/apache/lucene/analysis/icu/segmentation/TestCharArrayIterator.java Thu Mar 29 17:34:34 2012
@@ -99,7 +99,7 @@ public class TestCharArrayIterator exten
     CharArrayIterator ci = new CharArrayIterator();
     ci.setText(text, 0, text.length);
     ci.next();
-    CharArrayIterator ci2 = (CharArrayIterator) ci.clone();
+    CharArrayIterator ci2 = ci.clone();
     assertEquals(ci.getIndex(), ci2.getIndex());
     assertEquals(ci.next(), ci2.next());
     assertEquals(ci.last(), ci2.last());

Modified: lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/demohtml/HTMLParserTokenManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/demohtml/HTMLParserTokenManager.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/demohtml/HTMLParserTokenManager.java (original)
+++ lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/demohtml/HTMLParserTokenManager.java Thu Mar 29 17:34:34 2012
@@ -464,7 +464,7 @@ private int jjMoveNfa_0(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -569,7 +569,7 @@ private int jjMoveNfa_5(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -670,7 +670,7 @@ private int jjMoveNfa_7(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -766,7 +766,7 @@ private int jjMoveNfa_4(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -892,7 +892,7 @@ private int jjMoveNfa_3(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -1061,7 +1061,7 @@ private int jjMoveNfa_6(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -1205,7 +1205,7 @@ private int jjMoveNfa_1(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -1361,7 +1361,7 @@ private int jjMoveNfa_2(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;

Modified: lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java (original)
+++ lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameRoundTask.java Thu Mar 29 17:34:34 2012
@@ -63,7 +63,7 @@ public class RepSumByNameRoundTask exten
         TaskStats stat2 = p2.get(rname);
         if (stat2 == null) {
           try {
-            stat2 = (TaskStats) stat1.clone();
+            stat2 = stat1.clone();
           } catch (CloneNotSupportedException e) {
             throw new RuntimeException(e);
           }

Modified: lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java (original)
+++ lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByNameTask.java Thu Mar 29 17:34:34 2012
@@ -62,7 +62,7 @@ public class RepSumByNameTask extends Re
         TaskStats stat2 = p2.get(name);
         if (stat2 == null) {
           try {
-            stat2 = (TaskStats) stat1.clone();
+            stat2 = stat1.clone();
           } catch (CloneNotSupportedException e) {
             throw new RuntimeException(e);
           }

Modified: lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java (original)
+++ lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefRoundTask.java Thu Mar 29 17:34:34 2012
@@ -59,7 +59,7 @@ public class RepSumByPrefRoundTask exten
         TaskStats stat2 = p2.get(rname);
         if (stat2 == null) {
           try {
-            stat2 = (TaskStats) stat1.clone();
+            stat2 = stat1.clone();
           } catch (CloneNotSupportedException e) {
             throw new RuntimeException(e);
           }

Modified: lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java (original)
+++ lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/RepSumByPrefTask.java Thu Mar 29 17:34:34 2012
@@ -60,7 +60,7 @@ public class RepSumByPrefTask extends Re
         TaskStats stat2 = p2.get(name);
         if (stat2 == null) {
           try {
-            stat2 = (TaskStats) stat1.clone();
+            stat2 = stat1.clone();
           } catch (CloneNotSupportedException e) {
             throw new RuntimeException(e);
           }

Modified: lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java (original)
+++ lucene/dev/trunk/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/TaskSequence.java Thu Mar 29 17:34:34 2012
@@ -347,7 +347,7 @@ public class TaskSequence extends PerfTa
     int index = 0;
     for (int k=0; k<repetitions; k++) {
       for (int i = 0; i < tasksArray.length; i++) {
-        final PerfTask task = (PerfTask) tasksArray[i].clone();
+        final PerfTask task = tasksArray[i].clone();
         t[index++] = new ParallelTask(task);
       }
     }
@@ -512,7 +512,7 @@ public class TaskSequence extends PerfTa
     TaskSequence res = (TaskSequence) super.clone();
     res.tasks = new ArrayList<PerfTask>();
     for (int i = 0; i < tasks.size(); i++) {
-      res.tasks.add((PerfTask)tasks.get(i).clone());
+      res.tasks.add(tasks.get(i).clone());
     }
     return res;
   }

Modified: lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/index/attributes/CategoryAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/index/attributes/CategoryAttributeImpl.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/index/attributes/CategoryAttributeImpl.java (original)
+++ lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/index/attributes/CategoryAttributeImpl.java Thu Mar 29 17:34:34 2012
@@ -124,7 +124,7 @@ public final class CategoryAttributeImpl
   public CategoryAttributeImpl clone() {
     CategoryAttributeImpl ca = (CategoryAttributeImpl) super.clone();
     if (categoryPath != null) {
-      ca.categoryPath = (CategoryPath) categoryPath.clone();
+      ca.categoryPath = categoryPath.clone();
     }
     if (properties != null && !properties.isEmpty()) {
       ca.properties = (HashMap<Class<? extends CategoryProperty>, CategoryProperty>) properties

Modified: lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/search/params/FacetRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/search/params/FacetRequest.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/search/params/FacetRequest.java (original)
+++ lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/search/params/FacetRequest.java Thu Mar 29 17:34:34 2012
@@ -248,9 +248,9 @@ public abstract class FacetRequest imple
   public FacetResultsHandler createFacetResultsHandler(TaxonomyReader taxonomyReader) {
     try {
       if (resultMode == ResultMode.PER_NODE_IN_TREE) {
-        return new TopKInEachNodeHandler(taxonomyReader, (FacetRequest) clone());
+        return new TopKInEachNodeHandler(taxonomyReader, clone());
       } 
-      return new TopKFacetResultsHandler(taxonomyReader, (FacetRequest) clone());
+      return new TopKFacetResultsHandler(taxonomyReader, clone());
     } catch (CloneNotSupportedException e) {
       // Shouldn't happen since we implement Cloneable. If it does happen, it is
       // probably because the class was changed to not implement Cloneable

Modified: lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/util/ScoredDocIdsUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/util/ScoredDocIdsUtils.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/util/ScoredDocIdsUtils.java (original)
+++ lucene/dev/trunk/modules/facet/src/java/org/apache/lucene/facet/util/ScoredDocIdsUtils.java Thu Mar 29 17:34:34 2012
@@ -56,7 +56,7 @@ public class ScoredDocIdsUtils {
     final OpenBitSet complement;
     if (docIdSet instanceof OpenBitSet) {
       // That is the most common case, if ScoredDocIdsCollector was used.
-      complement = (OpenBitSet) ((OpenBitSet) docIdSet).clone();
+      complement = ((OpenBitSet) docIdSet).clone();
     } else {
       complement = new OpenBitSetDISI(docIdSet.iterator(), maxDoc);
     }

Modified: lucene/dev/trunk/modules/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java (original)
+++ lucene/dev/trunk/modules/facet/src/test/org/apache/lucene/facet/search/params/FacetRequestTest.java Thu Mar 29 17:34:34 2012
@@ -88,7 +88,7 @@ public class FacetRequestTest extends Lu
   @Test
   public void testClone() throws Exception {
     FacetRequest fr = new CountFacetRequest(new CategoryPath("a"), 10);
-    FacetRequest clone = (FacetRequest) fr.clone();
+    FacetRequest clone = fr.clone();
     fr.setDepth(10);
     assertEquals("depth should not have been affected in the clone", FacetRequest.DEFAULT_DEPTH, clone.getDepth());
   }

Modified: lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java (original)
+++ lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java Thu Mar 29 17:34:34 2012
@@ -336,7 +336,7 @@ public class ToChildBlockJoinQuery exten
 
   @Override
   public ToChildBlockJoinQuery clone() {
-    return new ToChildBlockJoinQuery((Query) origParentQuery.clone(),
+    return new ToChildBlockJoinQuery(origParentQuery.clone(),
                                      parentsFilter,
                                      doScores);
   }

Modified: lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java (original)
+++ lucene/dev/trunk/modules/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java Thu Mar 29 17:34:34 2012
@@ -451,7 +451,7 @@ public class ToParentBlockJoinQuery exte
 
   @Override
   public ToParentBlockJoinQuery clone() {
-    return new ToParentBlockJoinQuery((Query) origChildQuery.clone(),
+    return new ToParentBlockJoinQuery(origChildQuery.clone(),
                               parentsFilter,
                               scoreMode);
   }

Modified: lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/BoostingQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/BoostingQuery.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/BoostingQuery.java (original)
+++ lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/BoostingQuery.java Thu Mar 29 17:34:34 2012
@@ -44,7 +44,7 @@ public class BoostingQuery extends Query
 
     public BoostingQuery(Query match, Query context, float boost) {
       this.match = match;
-      this.context = (Query) context.clone();        // clone before boost
+      this.context = context.clone();        // clone before boost
       this.boost = boost;
       this.context.setBoost(0.0f);                      // ignore context-only matches
     }

Modified: lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java (original)
+++ lucene/dev/trunk/modules/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java Thu Mar 29 17:34:34 2012
@@ -88,14 +88,14 @@ public class CustomScoreQuery extends Qu
     
     final Query sq = subQuery.rewrite(reader);
     if (sq != subQuery) {
-      clone = (CustomScoreQuery) clone();
+      clone = clone();
       clone.subQuery = sq;
     }
 
     for(int i = 0; i < scoringQueries.length; i++) {
       final Query v = scoringQueries[i].rewrite(reader);
       if (v != scoringQueries[i]) {
-        if (clone == null) clone = (CustomScoreQuery) clone();
+        if (clone == null) clone = clone();
         clone.scoringQueries[i] = v;
       }
     }
@@ -116,10 +116,10 @@ public class CustomScoreQuery extends Qu
   @Override
   public CustomScoreQuery clone() {
     CustomScoreQuery clone = (CustomScoreQuery)super.clone();
-    clone.subQuery = (Query) subQuery.clone();
+    clone.subQuery = subQuery.clone();
     clone.scoringQueries = new Query[scoringQueries.length];
     for(int i = 0; i < scoringQueries.length; i++) {
-      clone.scoringQueries[i] = (Query) scoringQueries[i].clone();
+      clone.scoringQueries[i] = scoringQueries[i].clone();
     }
     return clone;
   }

Modified: lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.java (original)
+++ lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.java Thu Mar 29 17:34:34 2012
@@ -438,7 +438,7 @@ private int jjMoveNfa_2(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -604,7 +604,7 @@ private int jjMoveNfa_0(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -777,7 +777,7 @@ private int jjMoveNfa_1(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;

Modified: lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParserTokenManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParserTokenManager.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParserTokenManager.java (original)
+++ lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParserTokenManager.java Thu Mar 29 17:34:34 2012
@@ -374,7 +374,7 @@ private int jjMoveNfa_2(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -494,7 +494,7 @@ private int jjMoveNfa_0(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -667,7 +667,7 @@ private int jjMoveNfa_1(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;

Modified: lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/OpenRangeQueryNodeProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/OpenRangeQueryNodeProcessor.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/OpenRangeQueryNodeProcessor.java (original)
+++ lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/processors/OpenRangeQueryNodeProcessor.java Thu Mar 29 17:34:34 2012
@@ -37,12 +37,11 @@ public class OpenRangeQueryNodeProcessor
     
     if (node instanceof TermRangeQueryNode) {
       TermRangeQueryNode rangeNode = (TermRangeQueryNode) node;
-      FieldQueryNode lowerNode = (FieldQueryNode) rangeNode.getLowerBound();
-      FieldQueryNode upperNode = (FieldQueryNode) rangeNode.getUpperBound();
+      FieldQueryNode lowerNode = rangeNode.getLowerBound();
+      FieldQueryNode upperNode = rangeNode.getUpperBound();
       CharSequence lowerText = lowerNode.getText();
       CharSequence upperText = upperNode.getText();
       
-      
       if (OPEN_RANGE_TOKEN.equals(upperNode.getTextAsString())
           && (!(upperText instanceof UnescapedCharSequence) || !((UnescapedCharSequence) upperText)
               .wasEscaped(0))) {
@@ -57,7 +56,6 @@ public class OpenRangeQueryNodeProcessor
       
       lowerNode.setText(lowerText);
       upperNode.setText(upperText);
-      
     }
     
     return node;

Modified: lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParserTokenManager.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParserTokenManager.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParserTokenManager.java (original)
+++ lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParserTokenManager.java Thu Mar 29 17:34:34 2012
@@ -348,7 +348,7 @@ private int jjMoveNfa_1(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;
@@ -468,7 +468,7 @@ private int jjMoveNfa_0(int startState, 
       }
       else
       {
-         int hiByte = (int)(curChar >> 8);
+         int hiByte = (curChar >> 8);
          int i1 = hiByte >> 6;
          long l1 = 1L << (hiByte & 077);
          int i2 = (curChar & 0xff) >> 6;

Modified: lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java (original)
+++ lucene/dev/trunk/modules/queryparser/src/java/org/apache/lucene/queryparser/surround/query/FieldsQuery.java Thu Mar 29 17:34:34 2012
@@ -54,7 +54,7 @@ public class FieldsQuery extends SrndQue
       Iterator<String> fni = getFieldNames().listIterator();
       SrndQuery qc;
       while (fni.hasNext()) {
-        qc = (SrndQuery) q.clone();
+        qc = q.clone();
         queries.add( new FieldsQuery( qc, fni.next(), fieldOp));
       }
       OrQuery oq = new OrQuery(queries,

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsFilterFactory.java Thu Mar 29 17:34:34 2012
@@ -58,7 +58,7 @@ public class CommonGramsFilterFactory ex
         throw new RuntimeException(e);
       }
     } else {
-      commonWords = (CharArraySet) StopAnalyzer.ENGLISH_STOP_WORDS_SET;
+      commonWords = StopAnalyzer.ENGLISH_STOP_WORDS_SET;
     }
   }
       

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java Thu Mar 29 17:34:34 2012
@@ -65,7 +65,7 @@ public class CommonGramsQueryFilterFacto
         throw new RuntimeException(e);
       }
     } else {
-      commonWords = (CharArraySet) StopAnalyzer.ENGLISH_STOP_WORDS_SET;
+      commonWords = StopAnalyzer.ENGLISH_STOP_WORDS_SET;
     }
   }
 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MaxFieldValueUpdateProcessorFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MaxFieldValueUpdateProcessorFactory.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MaxFieldValueUpdateProcessorFactory.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MaxFieldValueUpdateProcessorFactory.java Thu Mar 29 17:34:34 2012
@@ -60,7 +60,7 @@ public final class MaxFieldValueUpdatePr
     Collection result = values;
     try {
       result = Collections.singletonList
-        (Collections.max((Collection)values));
+        (Collections.max(values));
     } catch (ClassCastException e) {
       throw new SolrException
         (BAD_REQUEST, 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MinFieldValueUpdateProcessorFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MinFieldValueUpdateProcessorFactory.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MinFieldValueUpdateProcessorFactory.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/MinFieldValueUpdateProcessorFactory.java Thu Mar 29 17:34:34 2012
@@ -60,7 +60,7 @@ public final class MinFieldValueUpdatePr
     Collection result = values;
     try {
       result = Collections.singletonList
-        (Collections.min((Collection)values));
+        (Collections.min(values));
     } catch (ClassCastException e) {
       throw new SolrException
         (BAD_REQUEST, 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/ConcurrentLRUCache.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/ConcurrentLRUCache.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/ConcurrentLRUCache.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/ConcurrentLRUCache.java Thu Mar 29 17:34:34 2012
@@ -321,7 +321,7 @@ public class ConcurrentLRUCache<K,V> {
             // this loop so far.
             queue.myMaxSize = sz - lowerWaterMark - numRemoved;
             while (queue.size() > queue.myMaxSize && queue.size() > 0) {
-              CacheEntry otherEntry = (CacheEntry) queue.pop();
+              CacheEntry otherEntry = queue.pop();
               newOldestEntry = Math.min(otherEntry.lastAccessedCopy, newOldestEntry);
             }
             if (queue.myMaxSize <= 0) break;

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java?rev=1307012&r1=1307011&r2=1307012&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/schema/DateFieldTest.java Thu Mar 29 17:34:34 2012
@@ -207,10 +207,10 @@ public class DateFieldTest extends Lucen
   public void testCreateField() {
     int props = FieldProperties.INDEXED ^ FieldProperties.STORED;
     SchemaField sf = new SchemaField( "test", f, props, null );
-    IndexableField out = (Field)f.createField(sf, "1995-12-31T23:59:59Z", 1.0f );
+    IndexableField out = f.createField(sf, "1995-12-31T23:59:59Z", 1.0f );
     assertEquals(820454399000l, f.toObject( out ).getTime() );
     
-    out = (Field)f.createField(sf, new Date(820454399000l), 1.0f );
+    out = f.createField(sf, new Date(820454399000l), 1.0f );
     assertEquals(820454399000l, f.toObject( out ).getTime() );
   }
 }



Mime
View raw message