Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-5628

Some @Data annotated classes do not include fields from superclass in equals / hashCode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 6.2
    • None
    • None
    • None
    • UI Framework & 6.2 Ramp up 15
    • 1

    Description

      Lombok's @Data annotation does not include fields from the super class in the generated equals and hashCode methods. This can lead to subtle bugs when instances of such classes are used as keys in a map. We should use the @EqualsAndHashCode(callSuper = true) annotation where necessary to explicitly include fields of super classes. Potential candidates are:

      • CompositeFieldDefinition
      • ConfiguredComplexPropertyDefinition
      • ConfiguredMultiFormDefinition
      • ConfiguredSwitchableFieldDefinition
      • JcrNodeFromLocationResolutionDefinition
      • JcrPropertyProvider
      • NotificationWorkbenchDefinition
      • TasksWorkbenchDefinition

       

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                mduerig Michael Duerig
                mduerig Michael Duerig
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD