Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-4335

ImmutableGroup breaks contract between equals and hashCode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 2.8.3
    • None
    • Embedded
    • None

    Description

      Class com.atlassian.crowd.embedded.impl.ImmutableGroup has broken contract between hashCode and equals method - hashCode is derived from a group name however equals compares case insensitive group name. So hashcode for "Group1" and "group1" would be different, however they would be equal. It is problematic especially when groups are put into HashSets or are used as keys in HashMaps. Also com.atlassian.crowd.embedded.api.Group interface specifies that hashCode needs to be case insensitive.

      Attachments

        Issue Links

          Activity

            People

              tsroka Tomek (Inactive)
              tsroka Tomek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: