felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1310181 - /felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
Date Fri, 06 Apr 2012 06:27:59 GMT
Author: gnodet
Date: Fri Apr  6 06:27:59 2012
New Revision: 1310181

URL: http://svn.apache.org/viewvc?rev=1310181&view=rev
Log:
Small optimization in fileinstall

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

Modified: felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
URL: http://svn.apache.org/viewvc/felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java?rev=1310181&r1=1310180&r2=1310181&view=diff
==============================================================================
--- felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
(original)
+++ felix/trunk/fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
Fri Apr  6 06:27:59 2012
@@ -42,6 +42,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.jar.JarInputStream;
 import java.util.jar.Manifest;
+import java.util.regex.Pattern;
 
 import org.apache.felix.fileinstall.ArtifactInstaller;
 import org.apache.felix.fileinstall.ArtifactListener;
@@ -165,9 +166,10 @@ public class DirectoryWatcher extends Th
         {
             flt = new FilenameFilter()
             {
+                Pattern pattern = Pattern.compile(filter);
                 public boolean accept(File dir, String name)
                 {
-                    return name.matches(filter);
+                    return pattern.matcher(name).matches();
                 }
             };
         }



Mime
View raw message