You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Roman Puchkovskiy (JIRA)" <ji...@apache.org> on 2008/06/30 15:09:45 UTC
[jira] Created: (JCR-1665) In JCAConnectionRequestInfo, equals()
and hashCode() implementations are inconsistent
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.
[jira] Assigned: (JCR-1665) In JCAConnectionRequestInfo, equals()
and hashCode() implementations are inconsistent
Posted by "Claus Köll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Köll reassigned JCR-1665:
-------------------------------
Assignee: Claus Köll
> In JCAConnectionRequestInfo, equals() and hashCode() implementations are inconsistent
> -------------------------------------------------------------------------------------
>
> Key: JCR-1665
> URL: https://issues.apache.org/jira/browse/JCR-1665
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jca
> Affects Versions: 1.4
> Reporter: Roman Puchkovskiy
> Assignee: Claus Köll
> Attachments: JCR-1665.patch
>
>
> 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.
[jira] Resolved: (JCR-1665) In JCAConnectionRequestInfo, equals()
and hashCode() implementations are inconsistent
Posted by "Claus Köll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Köll resolved JCR-1665.
-----------------------------
Resolution: Fixed
Thanks for the patch ! Applied in rev. 779032
> In JCAConnectionRequestInfo, equals() and hashCode() implementations are inconsistent
> -------------------------------------------------------------------------------------
>
> Key: JCR-1665
> URL: https://issues.apache.org/jira/browse/JCR-1665
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jca
> Affects Versions: 1.4
> Reporter: Roman Puchkovskiy
> Assignee: Claus Köll
> Fix For: 1.6.0
>
> Attachments: JCR-1665.patch
>
>
> 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.
[jira] Updated: (JCR-1665) In JCAConnectionRequestInfo, equals()
and hashCode() implementations are inconsistent
Posted by "Roman Puchkovskiy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Puchkovskiy updated JCR-1665:
-----------------------------------
Attachment: JCR-1665.patch
Attaching a patch which contains a test demonstrating a problem and a quick fix.
> 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
> Attachments: JCR-1665.patch
>
>
> 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.
[jira] Updated: (JCR-1665) In JCAConnectionRequestInfo, equals()
and hashCode() implementations are inconsistent
Posted by "Claus Köll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Köll updated JCR-1665:
----------------------------
Fix Version/s: 1.6.0
> In JCAConnectionRequestInfo, equals() and hashCode() implementations are inconsistent
> -------------------------------------------------------------------------------------
>
> Key: JCR-1665
> URL: https://issues.apache.org/jira/browse/JCR-1665
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jca
> Affects Versions: 1.4
> Reporter: Roman Puchkovskiy
> Assignee: Claus Köll
> Fix For: 1.6.0
>
> Attachments: JCR-1665.patch
>
>
> 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.
[jira] Commented: (JCR-1665) In JCAConnectionRequestInfo, equals()
and hashCode() implementations are inconsistent
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725644#action_12725644 ]
Jukka Zitting commented on JCR-1665:
------------------------------------
Merged to the 1.x branch in revision 789706.
> In JCAConnectionRequestInfo, equals() and hashCode() implementations are inconsistent
> -------------------------------------------------------------------------------------
>
> Key: JCR-1665
> URL: https://issues.apache.org/jira/browse/JCR-1665
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jca
> Affects Versions: 1.4
> Reporter: Roman Puchkovskiy
> Assignee: Claus Köll
> Fix For: 1.6.0
>
> Attachments: JCR-1665.patch
>
>
> 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.