Commons Lang
  1. Commons Lang
  2. LANG-636

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6
    • Component/s: lang.text.*
    • Labels:
      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).

        Activity

        Hide
        Niall Pemberton added a comment -

        Fixed in the trunk and 2.x branch

        Show
        Niall Pemberton added a comment - Fixed in the trunk and 2.x branch
        Hide
        Henri Yandell added a comment -

        Do you have a specific solution in mind?

        Show
        Henri Yandell added a comment - Do you have a specific solution in mind?

          People

          • Assignee:
            Niall Pemberton
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development