tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1001955 - /tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
Date Mon, 27 Sep 2010 23:06:08 GMT
Author: markt
Date: Mon Sep 27 23:06:08 2010
New Revision: 1001955

URL: http://svn.apache.org/viewvc?rev=1001955&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49209
Prevent possible AccessControlException during undeployment when running with a security manager
Patch provided by Sylvain Laurent

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=1001955&r1=1001954&r2=1001955&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Mon Sep 27 23:06:08
2010
@@ -2022,7 +2022,7 @@ public class WebappClassLoader
             }
             Class<?> lpClass =
                 defineClass("org.apache.catalina.loader.JdbcLeakPrevention",
-                    classBytes, 0, offset);
+                    classBytes, 0, offset, this.getClass().getProtectionDomain());
             Object obj = lpClass.newInstance();
             @SuppressWarnings("unchecked") // clearJdbcDriverRegistrations() returns List<String>

             List<String> driverNames = (List<String>) obj.getClass().getMethod(



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


Mime
View raw message