felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r938984 - /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/Scanner.java
Date Wed, 28 Apr 2010 14:26:25 GMT
Author: gnodet
Date: Wed Apr 28 14:26:24 2010
New Revision: 938984

URL: http://svn.apache.org/viewvc?rev=938984&view=rev
Log:
FELIX-1776: minimize the number of calls to File#getCanonicalFile()

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=938984&r1=938983&r2=938984&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
Wed Apr 28 14:26:24 2010
@@ -69,7 +69,7 @@ public class Scanner {
      */
     public Scanner(File directory, FilenameFilter filter)
     {
-        this.directory = directory;
+        this.directory = canon(directory);
         this.filter = filter;
     }
 
@@ -107,7 +107,7 @@ public class Scanner {
         Set/*<File>*/ removed = new HashSet/*<File>*/(storedChecksums.keySet());
         for (int i = 0; i < list.length; i++)
         {
-            File file  = canon(list[i]);
+            File file  = list[i];
             long lastChecksum = lastChecksums.get(file) != null ? ((Long) lastChecksums.get(file)).longValue()
: 0;
             long storedChecksum = storedChecksums.get(file) != null ? ((Long) storedChecksums.get(file)).longValue()
: 0;
             long newChecksum = checksum(file);



Mime
View raw message