Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4849

@EqualsAndHashCode should use getX() instead of x when accessing properties

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.1
    • Component/s: None
    • Labels:
      None

      Description

      Currently the hashCode() and equals() methods generated using @Canonical or @EqualsAndHashCode directly access the field rather than using the property getters. If custom getters have been provided, this yields the incorrect value.

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              paulk Paul King
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: