tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1345359 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ApplicationContext.java webapps/docs/changelog.xml
Date Fri, 01 Jun 2012 21:42:24 GMT
Author: kkolinko
Date: Fri Jun  1 21:42:24 2012
New Revision: 1345359

URL: http://svn.apache.org/viewvc?rev=1345359&view=rev
Log:
Merged revision 1345357 from tomcat/trunk:
For https://issues.apache.org/bugzilla/show_bug.cgi?id=53257
Review of r1344902:
restore passing DirContextURLStreamHandler instance into the new URL.

Note that we use "new DirContextURLStreamHandler(DirContext)" and
thus the handler will not need to call DirContextURLStreamHandler#get() to retrieve the context.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1345357

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1345359&r1=1345358&r2=1345359&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java Fri Jun  1
21:42:24 2012
@@ -67,6 +67,7 @@ import org.apache.catalina.connector.Con
 import org.apache.catalina.deploy.FilterDef;
 import org.apache.catalina.util.ResourceSet;
 import org.apache.catalina.util.ServerInfo;
+import org.apache.naming.resources.DirContextURLStreamHandler;
 import org.apache.naming.resources.Resource;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.buf.CharChunk;
@@ -533,8 +534,9 @@ public class ApplicationContext
             String hostName = context.getParent().getName();
             try {
                 resources.lookup(normPath);
-                return new URI("jndi",
-                        getJNDIUri(hostName, fullPath), null).toURL();
+                URI uri = new URI("jndi", getJNDIUri(hostName, fullPath), null);
+                return new URL(null, uri.toString(),
+                        new DirContextURLStreamHandler(resources));
             } catch (NamingException e) {
                 // Ignore
             } catch (Exception e) {

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1345359&r1=1345358&r2=1345359&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Jun  1 21:42:24 2012
@@ -146,14 +146,15 @@
         <code>JreMemoryLeakPreventionListener</code>. (markt)
       </fix>
       <fix>
-        <bug>53257</bug>: Ensure that resources, inclusing JSP files, that have
+        <bug>53257</bug>: Ensure that resources, including JSP files, that have
         names that include characters with special meanings in URLs (such as
         ampersand, semicolon, plus, hash and percent) are correctly handled.
         This bug is partially a regression caused by the original fix for
         <bug>51584</bug> and partially an existing issue that had not previously
         been identified. This fix reverts the original fix for <bug>51584</bug>,
         correctly fixes that issue and fixes the additional issues identified by
-        the test cases that were also added as part of this fix. (markt)
+        the test cases that were also added as part of this fix.
+        (markt/kkolinko)
       </fix>
       <fix>
         <bug>53267</bug>: Ensure that using the GC Daemon Protection feature
of



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message