Hi Sean

Sean Radford wrote:

Should the net.sf.acegisecurity.intercept.method.MethodDefinitionAttributes.lookupAttributes(MethodInvocation invocation) return <code>null</code> when there are no <code>ConfigAttribute</code>s within the <code>ConfigAttributeDefinition</code> instead of an empty one?

Yes, as you probably noticed AbstractSecurityInterceptor (version 1.4) line 271 expects the ObjectDefinitionSource (which in the case of a MethodSecurityInterceptor is a MethodDefinitionSource) to return a null ConfigAttributeDefinition if the ObjectDefinitionSource.getAttributes(Object) (which delegates to MethodDefinitionSource.lookupAttributes(MethodInvocation)) cannot find an attribute. I have clarified the interface contract for ObjectDefinitionSource.getAttributes(Object) to specify null should be returned.

I've added a unit test to MethodDefinitionSourceEditorTests, which already provided this behavior.

I've had to modify MethodDefinitionAttributes to accommodate this, given it previously returned an empty ConfigAttributeDefinition. I've also added a corresponding test to MethodDefinitionAttributesTest.

Also, should net.sf.acegisecurity.ConfigAttributeDefinition have a size() method (particularly useful if null is not returned)?


I've just added a size() method. This unit tested in ConfigAttributeEditorTests.

As per your other email, I have also added a contains(ConfigAttribute) method to ConfigAttributeDefinition. Again, this is unit tested in ConfigAttributeEditorTests.

All of the above changes are now in CVS.

Best regards
Ben



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Acegisecurity-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to