[ 
https://issues.apache.org/jira/browse/DIRMINA-534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576023#action_12576023
 ] 

Mark Webb commented on DIRMINA-534:
-----------------------------------

I would have to agree with Roger's logic.  Looking at the Javadoc for the 
System.identityHashCode(Object) :

"Returns the same hash code for the given object as would be returned by the 
default method hashCode(), whether or not the given object's class overrides 
hashCode(). The hash code for the null reference is zero."

I am not sure that it bothers anything by the AbstractIoSession overriding 
equals() and hashCode() though...

> AbstractIoSession's getId()
> ---------------------------
>
>                 Key: DIRMINA-534
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-534
>             Project: MINA
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-M2
>            Reporter: Roger Kapsi
>            Priority: Minor
>             Fix For: 2.0.0-M2
>
>
> I would use System.identityHashCode(this) instead of hashCode() in 
> AbstractIoSession.getId() and you'd have to no longer override equals & 
> hashCode() (I assume that's the reason why both methods are overridden & 
> final).

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

Reply via email to