You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "brian wallis (JIRA)" <ji...@apache.org> on 2011/08/04 07:13:27 UTC

[jira] [Created] (JCR-3039) JCAResourceAdapter should implement equals and hashCode

JCAResourceAdapter should implement equals and hashCode
-------------------------------------------------------

                 Key: JCR-3039
                 URL: https://issues.apache.org/jira/browse/JCR-3039
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-jca
    Affects Versions: 2.2.7
            Reporter: brian wallis


According to the spec, the JCAResourceAdapter class should override the equals and hashCode methods inherited from java.lang.Object. 

I suspect in the case of JackRabbit that this is a very simple implementation since the object has no real state and is a front for a singleton. But the spec requires it and the IronJacamar validation tool indicates an error when run against the rar file.

>From Section 16.4 of the J2EE Connector Architecture Specification Version 1.5:

Equality based on config properties and class information

The candidate objects are implementations of ResourceAdapter, ManagedConnectionFactory, ConnectionRequestInfo, java.security.Principal, org.ietf.jgss.GSSCredential, GenericCredential, PasswordCredential, and Record types.

These objects must override the default equals and hashCode methods, and provide an equality behavior based on the configuration properties and class information. That is, any two objects can be equal only if their configuration properties match and they have the same class implementation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira