[seam-issues] [JBoss JIRA] (SEAMSECURITY-130) Usage and implementation of equals/hashcode

bram meijboom (Created) (JIRA) jira-events at lists.jboss.org
Fri Nov 25 03:48:40 EST 2011


Usage and implementation of equals/hashcode 
--------------------------------------------

                 Key: SEAMSECURITY-130
                 URL: https://issues.jboss.org/browse/SEAMSECURITY-130
             Project: Seam Security
          Issue Type: Bug
    Affects Versions: 3.1.0.Beta4
         Environment: PICKETLINK-LDAP 1.5.0.ALPHA02, PICKETLINK 1.5.0.ALPHA02
            Reporter: bram meijboom
            Priority: Critical


Implementations of equals and hashcode are not consistent for the implemented org.picketlink.idm.spi.model.* classes, so a SimpleIdentityObject is not found in a hashset with IdentityObjectImpl's if there is a entry in the set that has the same name/type as the ldap one.

Due to the usage of hashsets in FallbackIdentityStoreRepository you end up with double entries when query-ing for objects. i think this is also a issue in the implementation of the FallbackIdentityStoreRepository (wich should use the interface only and not the equals/hashcode) or the api wich should provide consistent way of determining the hashcode and equals.


affected class:org.jboss.seam.security.management.IdentityObjectImpl

suggestions: 
 - use the provided org.picketlink.idm.impl.types.SimpleIdentityObject in the org.jboss.seam.security.management.picketlink.JpaIdentityStore
 - make IdentityObjectImpl a subclass of SimpleIdentityObject 


PS: 
the implementation of LDAPIdentityObjectImpl is not consistent to, it uses the id.hashCode() in calculating the hashcode and not the name







--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list