commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-636) text.ExtendedMessageFormat doesn't override java.text.MessageFormat.equals(Object)
Date Fri, 17 Sep 2010 05:07:33 GMT

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

Henri Yandell commented on LANG-636:
------------------------------------

Do you have a specific solution in mind?

> text.ExtendedMessageFormat doesn't override java.text.MessageFormat.equals(Object)
> ----------------------------------------------------------------------------------
>
>                 Key: LANG-636
>                 URL: https://issues.apache.org/jira/browse/LANG-636
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.text.*
>            Reporter: Sebb
>             Fix For: 3.0
>
>
> Findbugs:
> Bug: org.apache.commons.lang3.text.ExtendedMessageFormat doesn't override java.text.MessageFormat.equals(Object)
> Pattern id: EQ_DOESNT_OVERRIDE_EQUALS, type: Eq, category: STYLE
> This class extends a class that defines an equals method and adds fields, but doesn't
define an equals method itself. Thus, equality on instances of this class will ignore the
identity of the subclass and the added fields. Be sure this is what is intended, and that
you don't need to override the equals method. Even if you don't need to override the equals
method, consider overriding it anyway to document the fact that the equals method for the
subclass just return the result of invoking super.equals(o). 

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


Mime
View raw message