You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sean Mickey (JIRA)" <ji...@apache.org> on 2010/07/03 18:52:49 UTC

[jira] Commented: (LANG-630) mutable.MutableObject defines equals(MutableObject) method and uses Object.equals(Object)

    [ https://issues.apache.org/jira/browse/LANG-630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884945#action_12884945 ] 

Sean Mickey commented on LANG-630:
----------------------------------

It seems like the best option is replacing the equals(MutableObject) with equals(Object). It simplifies the code, refactors  to what most developers expect, and the minor overhead associated calling intanceof is worth the improvement in the code.

The equality check is very simple and the hashCode operation will not have to change. Just making sure I'm not missing something before I give this a go.

> mutable.MutableObject defines equals(MutableObject) method and uses Object.equals(Object)
> -----------------------------------------------------------------------------------------
>
>                 Key: LANG-630
>                 URL: https://issues.apache.org/jira/browse/LANG-630
>             Project: Commons Lang
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> FIndbugs:
> mutable.MutableObject defines equals(MutableObject) method and uses Object.equals(Object)
> This class defines a covariant version of the equals() method, but inherits the normal equals(Object) method defined in the base java.lang.Object class.  The class should probably define a boolean equals(Object) method. 

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