Make WebappClassLoader to do not swallow AccessControlException
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 2 Nov 2009 09:03:13 +0000 (09:03 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 2 Nov 2009 09:03:13 +0000 (09:03 +0000)
See https://issues.apache.org/bugzilla/show_bug.cgi?id=48097

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@831828 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/loader/WebappClassLoader.java

index c87e5ed..1437397 100644 (file)
@@ -70,7 +70,7 @@ import org.apache.tomcat.util.IntrospectionUtils;
  * Specialized web application class loader.
  * <p>
  * This class loader is a full reimplementation of the 
- * <code>URLClassLoader</code> from the JDK. It is desinged to be fully
+ * <code>URLClassLoader</code> from the JDK. It is designed to be fully
  * compatible with a normal <code>URLClassLoader</code>, although its internal
  * behavior may be completely different.
  * <p>
@@ -901,6 +901,8 @@ public class WebappClassLoader
                     throw cnfe;
                 }
             } catch(AccessControlException ace) {
+                log.warn("WebappClassLoader.findClassInternal(" + name
+                        + ") security exception: " + ace.getMessage(), ace);
                 throw new ClassNotFoundException(name, ace);
             } catch (RuntimeException e) {
                 if (log.isTraceEnabled())
@@ -911,6 +913,8 @@ public class WebappClassLoader
                 try {
                     clazz = super.findClass(name);
                 } catch(AccessControlException ace) {
+                    log.warn("WebappClassLoader.findClassInternal(" + name
+                            + ") security exception: " + ace.getMessage(), ace);
                     throw new ClassNotFoundException(name, ace);
                 } catch (RuntimeException e) {
                     if (log.isTraceEnabled())