Author: lukaszlenart
Date: Thu Jan 20 15:59:39 2011
New Revision: 1061358

URL: http://svn.apache.org/viewvc?rev=1061358&view=rev
Log:
Solves WW-3507 - adds additional check for jboss.vfs.forceVfsJar parameter to 
treat vfsfile:// as a file in a Jar

Modified:
    
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java

Modified: 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java?rev=1061358&r1=1061357&r2=1061358&view=diff
==============================================================================
--- 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
 (original)
+++ 
struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/URLUtil.java
 Thu Jan 20 15:59:39 2011
@@ -30,6 +30,7 @@ public class URLUtil {
      */
     public static final String JBOSS5_VFSZIP = "vfszip";
     public static final String JBOSS5_VFSMEMORY = "vfsmemory";
+    public static final String JBOSS5_VFSFILE = "vfsfile";
 
     private static final Pattern JAR_PATTERN = 
Pattern.compile("^(jar:|wsjar:|zip:|vfsfile:|code-source:)?(file:)?(.*?)(\\!/|.jar/)(.*)");
     private static final int JAR_FILE_PATH = 3;
@@ -99,7 +100,8 @@ public class URLUtil {
      */
     public static boolean isJBoss5Url(URL fileUrl) {
         final String protocol = fileUrl.getProtocol();
-        return JBOSS5_VFSZIP.equals(protocol) || 
JBOSS5_VFSMEMORY.equals(fileUrl.getProtocol());
+        return JBOSS5_VFSZIP.equals(protocol) || 
JBOSS5_VFSMEMORY.equals(fileUrl.getProtocol())
+                || ("true".equals(System.getProperty("jboss.vfs.forceVfsJar")) 
&& JBOSS5_VFSFILE.equals(fileUrl.getProtocol()));
     }
 
 }


Reply via email to