[jboss-cvs] JBossAS SVN: r90171 - branches/Branch_5_x/server/src/main/org/jboss/deployment.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jun 13 07:02:23 EDT 2009


Author: emuckenhuber
Date: 2009-06-13 07:02:22 -0400 (Sat, 13 Jun 2009)
New Revision: 90171

Modified:
   branches/Branch_5_x/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java
Log:
use the VFS uri to compare the excludes.

Modified: branches/Branch_5_x/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java	2009-06-12 21:12:09 UTC (rev 90170)
+++ branches/Branch_5_x/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java	2009-06-13 11:02:22 UTC (rev 90171)
@@ -58,7 +58,7 @@
     */
    public boolean accepts(VirtualFile file)
    {
-      String pathName = file.getPathName();
+      String pathName = getPathName(file);
       for (Map.Entry<String, Set<String>> entry : excludes.entrySet())
       {
          String key = entry.getKey();
@@ -77,4 +77,24 @@
       }
       return true;
    }
+   
+   /**
+    * Get the path name for the VirtualFile.
+    * 
+    * @param file the virtual file
+    * @return the path name
+    */
+   private String getPathName(VirtualFile file)
+   {
+      try
+      {
+         // prefer the URI, as the pathName might
+         // return an empty string for temp virtual files
+         return file.toURI().toString();
+      }
+      catch(Exception e)
+      {
+         return file.getPathName();
+      }
+   }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list