tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1345029 - in /tomcat/trunk/java/org/apache/catalina: deploy/ServletDef.java startup/WebRuleSet.java
Date Fri, 01 Jun 2012 09:41:00 GMT
Author: markt
Date: Fri Jun  1 09:40:59 2012
New Revision: 1345029

URL: http://svn.apache.org/viewvc?rev=1345029&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53285
Modify how the digester processes security-role-ref since link is optional and null parameters
are not handled by IntrospectionUtils

Modified:
    tomcat/trunk/java/org/apache/catalina/deploy/ServletDef.java
    tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java

Modified: tomcat/trunk/java/org/apache/catalina/deploy/ServletDef.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/ServletDef.java?rev=1345029&r1=1345028&r2=1345029&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/deploy/ServletDef.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/ServletDef.java Fri Jun  1 09:40:59 2012
@@ -215,7 +215,9 @@ public class ServletDef implements Seria
     /**
      * Add a security-role-ref to the set of security-role-refs associated
      * with this servlet.
+     * @deprecated
      */
+    @Deprecated
     public void addSecurityRoleRef(String roleName, String roleLink) {
         SecurityRoleRef srr = new SecurityRoleRef();
         srr.setName(roleName);

Modified: tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java?rev=1345029&r1=1345028&r2=1345029&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java Fri Jun  1 09:40:59 2012
@@ -386,10 +386,15 @@ public class WebRuleSet extends RuleSetB
         digester.addCallMethod(fullPrefix + "/servlet/run-as/role-name",
                                "setRunAs", 0);
 
-        digester.addCallMethod(fullPrefix + "/servlet/security-role-ref",
-                               "addSecurityRoleRef", 2);
-        digester.addCallParam(fullPrefix + "/servlet/security-role-ref/role-link", 1);
-        digester.addCallParam(fullPrefix + "/servlet/security-role-ref/role-name", 0);
+        digester.addObjectCreate(fullPrefix + "/servlet/security-role-ref",
+                                 "org.apache.catalina.deploy.SecurityRoleRef");
+        digester.addSetNext(fullPrefix + "/servlet/security-role-ref",
+                            "addSecurityRoleRef",
+                            "org.apache.catalina.deploy.SecurityRoleRef");
+        digester.addCallMethod(fullPrefix + "/servlet/security-role-ref/role-link",
+                               "setLink", 0);
+        digester.addCallMethod(fullPrefix + "/servlet/security-role-ref/role-name",
+                               "setName", 0);
 
         digester.addCallMethod(fullPrefix + "/servlet/servlet-class",
                               "setServletClass", 0);



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


Mime
View raw message