diff --git a/core/src/main/java/org/springframework/security/intercept/method/MethodDefinitionAttributes.java b/core/src/main/java/org/springframework/security/intercept/method/MethodDefinitionAttributes.java index 704858a756..6a0638db0f 100644 --- a/core/src/main/java/org/springframework/security/intercept/method/MethodDefinitionAttributes.java +++ b/core/src/main/java/org/springframework/security/intercept/method/MethodDefinitionAttributes.java @@ -27,8 +27,11 @@ import java.util.Iterator; /** - * Stores a {@link ConfigAttributeDefinition} for each method signature defined by Commons Attributes.

This class - * will only detect those attributes which are defined for: + * Provides {@link ConfigAttributeDefinition}s for a method signature (via the lookupAttributes method) + * by delegating to a configured an {@link Attributes} object. The latter may use Java 5 annotations, Commons attributes + * or some other approach to determine the ConfigAttributes which apply. + *

+ * This class will only detect those attributes which are defined for: *

- *

- *

Note that attributes defined against parent classes (either for their methods or interfaces) are not - * detected. The attributes must be defined against an explicit method or interface on the intercepted class.

- *

Attributes detected that do not implement {@link ConfigAttribute} will be ignored.

+ *

+ * Note that attributes defined against parent classes (either for their methods or interfaces) are not + * detected. The attributes must be defined against an explicit method or interface on the intercepted class. + *

+ * Attributes detected that do not implement {@link ConfigAttribute} will be ignored. * * @author Cameron Braid * @author Ben Alex @@ -54,7 +58,7 @@ public class MethodDefinitionAttributes extends AbstractMethodDefinitionSource { private void add(ConfigAttributeDefinition definition, Collection attribs) { for (Iterator iter = attribs.iterator(); iter.hasNext();) { - Object o = (Object) iter.next(); + Object o = iter.next(); if (o instanceof ConfigAttribute) { definition.addConfigAttribute((ConfigAttribute) o);