1
1
/*
2
- * Copyright 2002-2013 the original author or authors.
2
+ * Copyright 2002-2014 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -66,15 +66,15 @@ public abstract class ResourceUtils {
66
66
/** URL protocol for an entry from a zip file: "zip" */
67
67
public static final String URL_PROTOCOL_ZIP = "zip" ;
68
68
69
+ /** URL protocol for an entry from a WebSphere jar file: "wsjar" */
70
+ public static final String URL_PROTOCOL_WSJAR = "wsjar" ;
71
+
69
72
/** URL protocol for an entry from a JBoss jar file: "vfszip" */
70
73
public static final String URL_PROTOCOL_VFSZIP = "vfszip" ;
71
74
72
75
/** URL protocol for a JBoss VFS resource: "vfs" */
73
76
public static final String URL_PROTOCOL_VFS = "vfs" ;
74
77
75
- /** URL protocol for an entry from a WebSphere jar file: "wsjar" */
76
- public static final String URL_PROTOCOL_WSJAR = "wsjar" ;
77
-
78
78
/** Separator between JAR URL and file path within the JAR */
79
79
public static final String JAR_URL_SEPARATOR = "!/" ;
80
80
@@ -252,7 +252,7 @@ public static File getFile(URI resourceUri, String description) throws FileNotFo
252
252
*/
253
253
public static boolean isFileURL (URL url ) {
254
254
String protocol = url .getProtocol ();
255
- return (URL_PROTOCOL_FILE .equals (protocol ) || protocol . startsWith ( URL_PROTOCOL_VFS ));
255
+ return (URL_PROTOCOL_FILE .equals (protocol ) || URL_PROTOCOL_VFS . equals ( protocol ));
256
256
}
257
257
258
258
/**
@@ -264,8 +264,9 @@ public static boolean isFileURL(URL url) {
264
264
* @return whether the URL has been identified as a JAR URL
265
265
*/
266
266
public static boolean isJarURL (URL url ) {
267
- String up = url .getProtocol ();
268
- return (URL_PROTOCOL_JAR .equals (up ) || URL_PROTOCOL_ZIP .equals (up ) || URL_PROTOCOL_WSJAR .equals (up ));
267
+ String protocol = url .getProtocol ();
268
+ return (URL_PROTOCOL_JAR .equals (protocol ) || URL_PROTOCOL_ZIP .equals (protocol ) ||
269
+ URL_PROTOCOL_WSJAR .equals (protocol ) || URL_PROTOCOL_VFSZIP .equals (protocol ));
269
270
}
270
271
271
272
/**
0 commit comments