@@ -72,7 +72,10 @@ public abstract class ResourceUtils {
72
72
/** URL protocol for an entry from a JBoss jar file: "vfszip" */
73
73
public static final String URL_PROTOCOL_VFSZIP = "vfszip" ;
74
74
75
- /** URL protocol for a JBoss VFS resource: "vfs" */
75
+ /** URL protocol for a JBoss file system resource: "vfsfile" */
76
+ public static final String URL_PROTOCOL_VFSFILE = "vfsfile" ;
77
+
78
+ /** URL protocol for a general JBoss VFS resource: "vfs" */
76
79
public static final String URL_PROTOCOL_VFS = "vfs" ;
77
80
78
81
/** Separator between JAR URL and file path within the JAR */
@@ -248,27 +251,26 @@ public static File getFile(URI resourceUri, String description) throws FileNotFo
248
251
249
252
/**
250
253
* Determine whether the given URL points to a resource in the file system,
251
- * that is, has protocol "file" or "vfs".
254
+ * that is, has protocol "file", "vfsfile" or "vfs".
252
255
* @param url the URL to check
253
256
* @return whether the URL has been identified as a file system URL
254
257
*/
255
258
public static boolean isFileURL (URL url ) {
256
259
String protocol = url .getProtocol ();
257
- return (URL_PROTOCOL_FILE .equals (protocol ) || URL_PROTOCOL_VFS .equals (protocol ));
260
+ return (URL_PROTOCOL_FILE .equals (protocol ) || URL_PROTOCOL_VFSFILE .equals (protocol ) ||
261
+ URL_PROTOCOL_VFS .equals (protocol ));
258
262
}
259
263
260
264
/**
261
265
* Determine whether the given URL points to a resource in a jar file,
262
- * that is, has protocol "jar", "zip", "wsjar" or "code-source".
263
- * <p>"zip" and "wsjar" are used by WebLogic Server and WebSphere, respectively,
264
- * but can be treated like jar files.
266
+ * that is, has protocol "jar", "zip", "vfszip" or "wsjar".
265
267
* @param url the URL to check
266
268
* @return whether the URL has been identified as a JAR URL
267
269
*/
268
270
public static boolean isJarURL (URL url ) {
269
271
String protocol = url .getProtocol ();
270
272
return (URL_PROTOCOL_JAR .equals (protocol ) || URL_PROTOCOL_ZIP .equals (protocol ) ||
271
- URL_PROTOCOL_WSJAR .equals (protocol ) || URL_PROTOCOL_VFSZIP .equals (protocol ));
273
+ URL_PROTOCOL_VFSZIP .equals (protocol ) || URL_PROTOCOL_WSJAR .equals (protocol ));
272
274
}
273
275
274
276
/**
0 commit comments