Author: markt
Date: Wed Jun 20 12:27:55 2012
New Revision: 1352056
URL: http://svn.apache.org/viewvc?rev=1352056&view=rev
Log:
getURI() and getURL() do exactly the same thing. Further the encoded parameter
of getURL() does not effect the output.
Deprecate getURL() and use getURI() instead.
Modified:
tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1352056&r1=1352055&r2=1352056&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Wed Jun
20 12:27:55 2012
@@ -1775,11 +1775,11 @@ public class WebappClassLoader
off = externalsLength;
}
for (i = 0; i < filesLength; i++) {
- urls[off + i] = getURL(files[i], true);
+ urls[off + i] = getURI(files[i]);
}
off += filesLength;
for (i = 0; i < jarFilesLength; i++) {
- urls[off + i] = getURL(jarRealFiles[i], true);
+ urls[off + i] = getURI(jarRealFiles[i]);
}
off += jarFilesLength;
if (!searchExternalFirst) {
@@ -2928,7 +2928,7 @@ public class WebappClassLoader
ResourceEntry entry = new ResourceEntry();
try {
entry.source = getURI(new File(file, path));
- entry.codeBase = getURL(new File(file, path), false);
+ entry.codeBase = entry.source;
} catch (MalformedURLException e) {
return null;
}
@@ -3062,8 +3062,8 @@ public class WebappClassLoader
entry = new ResourceEntry();
try {
- entry.codeBase = getURL(jarRealFiles[i], false);
- String jarFakeUrl =
getURI(jarRealFiles[i]).toString();
+ entry.codeBase = getURI(jarRealFiles[i]);
+ String jarFakeUrl = entry.codeBase.toString();
jarFakeUrl = "jar:" + jarFakeUrl + "!/" + path;
entry.source = new URL(jarFakeUrl);
entry.lastModified =
jarRealFiles[i].lastModified();
@@ -3449,7 +3449,9 @@ public class WebappClassLoader
/**
* Get URL.
+ * @deprecated Use {@link #getURI(File)} instead
*/
+ @Deprecated
protected URL getURL(File file, boolean encoded)
throws MalformedURLException {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]