[jboss-jira] [JBoss JIRA] Updated: (JBAS-6487) org.jboss.mq.server.MessageReference does override equals, but not hashCode
Rico Neubauer (JIRA)
jira-events at lists.jboss.org
Mon Feb 9 07:28:44 EST 2009
[ https://jira.jboss.org/jira/browse/JBAS-6487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rico Neubauer updated JBAS-6487:
--------------------------------
Attachment: JBAS-6487.diff
Patch
> org.jboss.mq.server.MessageReference does override equals, but not hashCode
> ---------------------------------------------------------------------------
>
> Key: JBAS-6487
> URL: https://jira.jboss.org/jira/browse/JBAS-6487
> Project: JBoss Application Server
> Issue Type: Quality Risk
> Security Level: Public(Everyone can see)
> Components: JMS (JBossMQ)
> Affects Versions: JBossAS-4.2.3.GA
> Reporter: Rico Neubauer
> Assignee: Adrian Brock
> Attachments: JBAS-6487.diff
>
>
> org.jboss.mq.server.MessageReference does override equals() (and even compareTo()), but not hashCode().
> This is a potential issue, when adding MessageReferences to hashCode-based Collections such as Hashmap or HashSet.
> from java.lang.Object:
> If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
> Will append a patch.
> Came across this when searching for the root of a symptom, where messages were processed and removed from the MessageCache, but still were persistent in database - don't know yet if it's related.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list