Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-636

text.ExtendedMessageFormat doesn't override java.text.MessageFormat.equals(Object)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.6
    • lang.text.*
    • None

    Description

      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).

      Attachments

        Activity

          People

            niallp Niall Pemberton
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: