Prevent possible AccessControlException during undeployment when running with a security manager
Patch provided by Sylvain Laurent
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@
1001955 13f79535-47bb-0310-9956-
ffa450edef68
}
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(