Avoid npe
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 4 Mar 2011 15:31:04 +0000 (15:31 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 4 Mar 2011 15:31:04 +0000 (15:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1078004 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/authenticator/AuthenticatorBase.java

index a84f386..92a768f 100644 (file)
@@ -481,8 +481,10 @@ public abstract class AuthenticatorBase extends ValveBase
 
         // The Servlet may specify security constraints through annotations.
         // Ensure that they have been processed before constraints are checked
-        Wrapper wrapper = (Wrapper) request.getMappingData().wrapper; 
-        wrapper.servletSecurityAnnotationScan();
+        Wrapper wrapper = (Wrapper) request.getMappingData().wrapper;
+        if (wrapper != null) {
+            wrapper.servletSecurityAnnotationScan();
+        }
 
         Realm realm = this.context.getRealm();
         // Is this request URI subject to a security constraint?