felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r938182 - /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Scanner.java
Date Mon, 26 Apr 2010 18:41:11 GMT
Author: gnodet
Date: Mon Apr 26 18:41:11 2010
New Revision: 938182

URL: http://svn.apache.org/viewvc?rev=938182&view=rev
Log:
Revert FELIX-2201 which cause regressions

Modified:
    felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Scanner.java

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Scanner.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Scanner.java?rev=938182&r1=938181&r2=938182&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Scanner.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Scanner.java
Mon Apr 26 18:41:11 2010
@@ -27,7 +27,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.TreeSet;
 import java.util.zip.CRC32;
 
 /**
@@ -104,7 +103,7 @@ public class Scanner {
         {
             return null;
         }
-        Set/*<File>*/ files = new TreeSet/*<File>*/(new FileModificationTimeComparator());
+        Set/*<File>*/ files = new HashSet/*<File>*/();
         Set/*<File>*/ removed = new HashSet/*<File>*/(storedChecksums.keySet());
         for (int i = 0; i < list.length; i++)
         {
@@ -201,18 +200,4 @@ public class Scanner {
         }
     }
 
-    /**
-     * {@link Comparator} that sorts {@link File}s in increasing order of modification time
-     * ("oldest first").
-     */
-    private final static class FileModificationTimeComparator implements Comparator
-    {
-        public int compare(Object arg0, Object arg1)
-        {
-            File lhs = (File) arg0;
-            File rhs = (File) arg1;
-            return (int) (lhs.lastModified() - rhs.lastModified());
-        }
-    }
-
 }



Mime
View raw message