« Return to Thread: [jira] Created: (JCR-1665) In JCAConnectionRequestInfo, equals() and hashCode() implementations are inconsistent

[jira] Created: (JCR-1665) In JCAConnectionRequestInfo, equals() and hashCode() implementations are inconsistent

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View in Thread

In JCAConnectionRequestInfo, equals() and hashCode() implementations are inconsistent
-------------------------------------------------------------------------------------

                 Key: JCR-1665
                 URL: https://issues.apache.org/jira/browse/JCR-1665
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-jca
    Affects Versions: 1.4
            Reporter: Roman Puchkovskiy


JCAConnectionRequestInfo behaves differently in its equals() and hashCode() methods. The former is aware about SimpleCredentials structure, so two instances of JCAConnectionRequestInfo were supplied SimpleCredentials instances with same userID, password and attributes, they are considered equal.
But JCAConnectionRequestInfo.hashCode() just delegates to SimpleCredentials.hashCode() which is same as Object's method. This breaks session pooling.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

 « Return to Thread: [jira] Created: (JCR-1665) In JCAConnectionRequestInfo, equals() and hashCode() implementations are inconsistent

LightInTheBox - Buy quality products at wholesale price!