jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1179264 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene: IndexDeletionPolicyImpl.java ReadOnlyIndexReader.java SortedMultiColumnQueryHits.java
Date Wed, 05 Oct 2011 15:33:08 GMT
Author: reschke
Date: Wed Oct  5 15:33:07 2011
New Revision: 1179264

URL: http://svn.apache.org/viewvc?rev=1179264&view=rev
Log:
generics

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexDeletionPolicyImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ReadOnlyIndexReader.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedMultiColumnQueryHits.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexDeletionPolicyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexDeletionPolicyImpl.java?rev=1179264&r1=1179263&r2=1179264&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexDeletionPolicyImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexDeletionPolicyImpl.java
Wed Oct  5 15:33:07 2011
@@ -42,15 +42,15 @@ public class IndexDeletionPolicyImpl imp
         readCurrentGeneration();
     }
 
-    public void onInit(List commits) throws IOException {
+    public void onInit(List<? extends IndexCommit> commits) throws IOException {
         checkCommits(commits);
     }
 
-    public void onCommit(List commits) throws IOException {
+    public void onCommit(List<? extends IndexCommit> commits) throws IOException {
         checkCommits(commits);
 
         // report back current generation
-        IndexCommit current = (IndexCommit) commits.get(commits.size() - 1);
+        IndexCommit current = commits.get(commits.size() - 1);
         String name = current.getSegmentsFileName();
         if (name.equals(SEGMENTS)) {
             index.setCurrentGeneration(0);
@@ -63,10 +63,10 @@ public class IndexDeletionPolicyImpl imp
 
     //-------------------------------< internal >-------------------------------
 
-    private void checkCommits(List commits) throws IOException {
+    private void checkCommits(List<? extends IndexCommit> commits) throws IOException
{
         long currentTime = System.currentTimeMillis();
         for (int i = 0; i < commits.size() - 1; i++) {
-            IndexCommit ic = (IndexCommit) commits.get(i);
+            IndexCommit ic = commits.get(i);
             long lastModified = index.getDirectory().fileModified(ic.getSegmentsFileName());
             if (currentTime - lastModified > maxAge) {
                 ic.delete();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ReadOnlyIndexReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ReadOnlyIndexReader.java?rev=1179264&r1=1179263&r2=1179264&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ReadOnlyIndexReader.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ReadOnlyIndexReader.java
Wed Oct  5 15:33:07 2011
@@ -177,7 +177,7 @@ class ReadOnlyIndexReader extends RefCou
      * @exception UnsupportedOperationException always
      */
     @Override
-    protected void doCommit(Map commitUserData) throws IOException { 
+    protected void doCommit(Map<String,String> commitUserData) throws IOException {

         throw new UnsupportedOperationException("IndexReader is read-only");
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedMultiColumnQueryHits.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedMultiColumnQueryHits.java?rev=1179264&r1=1179263&r2=1179264&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedMultiColumnQueryHits.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SortedMultiColumnQueryHits.java
Wed Oct  5 15:33:07 2011
@@ -147,7 +147,7 @@ public class SortedMultiColumnQueryHits 
                 throws IOException {
             this.reader = reader;
             this.orderings = orderings;
-            List names = Arrays.asList(selectorNames);
+            List<Name> names = Arrays.asList(selectorNames);
             this.idx = new int[orderings.length];
             this.comparators = new ScoreDocComparator[orderings.length];
             this.isReverse = new boolean[orderings.length];



Mime
View raw message