[jboss-cvs] JBossAS SVN: r90172 - branches/JBPAPP_5_0/server/src/main/org/jboss/deployment.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Jun 13 07:23:44 EDT 2009
Author: emuckenhuber
Date: 2009-06-13 07:23:44 -0400 (Sat, 13 Jun 2009)
New Revision: 90172
Modified:
branches/JBPAPP_5_0/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java
Log:
merge with branch 5_x, use the VFS uri to compare the excludes.
Modified: branches/JBPAPP_5_0/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java
===================================================================
--- branches/JBPAPP_5_0/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java 2009-06-13 11:02:22 UTC (rev 90171)
+++ branches/JBPAPP_5_0/server/src/main/org/jboss/deployment/FileNameVirtualFileFilter.java 2009-06-13 11:23:44 UTC (rev 90172)
@@ -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