lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r829013 [2/2] - in /lucene/java/trunk: contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/stats/ contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/u...
Date Fri, 23 Oct 2009 11:54:06 GMT
Modified: lucene/java/trunk/src/java/org/apache/lucene/index/MultipleTermPositions.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/MultipleTermPositions.java?rev=829013&r1=829012&r2=829013&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/MultipleTermPositions.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/MultipleTermPositions.java Fri Oct
23 11:54:03 2009
@@ -143,7 +143,7 @@
 
   public final boolean skipTo(int target) throws IOException {
     while (_termPositionsQueue.peek() != null && target > _termPositionsQueue.peek().doc())
{
-      TermPositions tp = (TermPositions) _termPositionsQueue.pop();
+      TermPositions tp =  _termPositionsQueue.pop();
       if (tp.skipTo(target))
         _termPositionsQueue.add(tp);
       else
@@ -162,7 +162,7 @@
 
   public final void close() throws IOException {
     while (_termPositionsQueue.size() > 0)
-      ((TermPositions) _termPositionsQueue.pop()).close();
+      _termPositionsQueue.pop().close();
   }
 
   /**

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java?rev=829013&r1=829012&r2=829013&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/ParallelReader.java Fri Oct 23 11:54:03
2009
@@ -195,8 +195,8 @@
       List<Boolean> newDecrefOnClose = new ArrayList<Boolean>();
       ParallelReader pr = new ParallelReader();
       for (int i = 0; i < readers.size(); i++) {
-        IndexReader oldReader = (IndexReader) readers.get(i);
-        IndexReader newReader = (IndexReader) newReaders.get(i);
+        IndexReader oldReader = readers.get(i);
+        IndexReader newReader = newReaders.get(i);
         if (newReader == oldReader) {
           newDecrefOnClose.add(Boolean.TRUE);
           newReader.incRef();
@@ -293,8 +293,7 @@
       if (vector != null)
         results.add(vector);
     }
-    return (TermFreqVector[])
-      results.toArray(new TermFreqVector[results.size()]);
+    return results.toArray(new TermFreqVector[results.size()]);
   }
 
   public TermFreqVector getTermFreqVector(int n, String field)

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/PositionBasedTermVectorMapper.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/PositionBasedTermVectorMapper.java?rev=829013&r1=829012&r2=829013&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/PositionBasedTermVectorMapper.java
(original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/PositionBasedTermVectorMapper.java
Fri Oct 23 11:54:03 2009
@@ -70,7 +70,7 @@
   public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)
{
     for (int i = 0; i < positions.length; i++) {
       Integer posVal = Integer.valueOf(positions[i]);
-      TVPositionInfo pos = (TVPositionInfo) currentPositions.get(posVal);
+      TVPositionInfo pos = currentPositions.get(posVal);
       if (pos == null) {
         pos = new TVPositionInfo(positions[i], storeOffsets);
         currentPositions.put(posVal, pos);

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=829013&r1=829012&r2=829013&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 Fri Oct 23 11:54:03
2009
@@ -264,7 +264,7 @@
       final int size = files.size();
       sizeInBytes = 0;
       for(int i=0;i<size;i++) {
-        final String fileName = (String) files.get(i);
+        final String fileName = files.get(i);
         // We don't count bytes used by a shared doc store
         // against this segment:
         if (docStoreOffset == -1 || !IndexFileNames.isDocStoreFile(fileName))

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMergeQueue.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMergeQueue.java?rev=829013&r1=829012&r2=829013&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMergeQueue.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMergeQueue.java Fri Oct 23 11:54:03
2009
@@ -35,7 +35,7 @@
 
   final void close() throws IOException {
     while (top() != null)
-      ((SegmentMergeInfo)pop()).close();
+      pop().close();
   }
 
 }

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java?rev=829013&r1=829012&r2=829013&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SegmentMerger.java Fri Oct 23 11:54:03
2009
@@ -115,7 +115,7 @@
    * @return The ith reader to be merged
    */
   final IndexReader segmentReader(int i) {
-    return (IndexReader) readers.get(i);
+    return readers.get(i);
   }
 
   /**
@@ -244,7 +244,7 @@
     // FieldInfos, then we can do a bulk copy of the
     // stored fields:
     for (int i = 0; i < numReaders; i++) {
-      IndexReader reader = (IndexReader) readers.get(i);
+      IndexReader reader = readers.get(i);
       if (reader instanceof SegmentReader) {
         SegmentReader segmentReader = (SegmentReader) reader;
         boolean same = true;
@@ -576,7 +576,7 @@
     int base = 0;
     final int readerCount = readers.size();
     for (int i = 0; i < readerCount; i++) {
-      IndexReader reader = (IndexReader) readers.get(i);
+      IndexReader reader = readers.get(i);
       TermEnum termEnum = reader.terms();
       SegmentMergeInfo smi = new SegmentMergeInfo(base, termEnum, reader);
       int[] docMap  = smi.getDocMap();
@@ -606,13 +606,13 @@
 
     while (queue.size() > 0) {
       int matchSize = 0;			  // pop matching terms
-      match[matchSize++] = (SegmentMergeInfo) queue.pop();
+      match[matchSize++] = queue.pop();
       Term term = match[0].term;
-      SegmentMergeInfo top = (SegmentMergeInfo) queue.top();
+      SegmentMergeInfo top = queue.top();
 
       while (top != null && term.compareTo(top.term) == 0) {
-        match[matchSize++] = (SegmentMergeInfo) queue.pop();
-        top = (SegmentMergeInfo) queue.top();
+        match[matchSize++] =  queue.pop();
+        top =  queue.top();
       }
 
       if (currentField != term.field) {

Modified: lucene/java/trunk/src/java/org/apache/lucene/index/SortedTermVectorMapper.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/index/SortedTermVectorMapper.java?rev=829013&r1=829012&r2=829013&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/index/SortedTermVectorMapper.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/index/SortedTermVectorMapper.java Fri Oct
23 11:54:03 2009
@@ -61,7 +61,7 @@
    */
   //We need to combine any previous mentions of the term
   public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)
{
-    TermVectorEntry entry = (TermVectorEntry) termToTVE.get(term);
+    TermVectorEntry entry =  termToTVE.get(term);
     if (entry == null) {
       entry = new TermVectorEntry(ALL, term, frequency, 
               storeOffsets == true ? offsets : null,



Mime
View raw message