Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5379 Cohort Membership: Resolve design inconsistents
  3. TRUNK-5478

Fixing TRUNK-5452 - Adapt equal signature and implement hashCode

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.3.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      The purpose of the earlier commit was  to  improve CohortMembership's equality check in collections.. For this code to be executed, equals method needs to have an Object in the method signature, not the specific class, like in this case equals(CohortMembership otherCohortMembership)

      Steps:

      • Adapt equal of CohortMembership to use Object
      • Create a hashCode method that is necessary for a Set in Java to work
      • Add a test case to validate the functionality 
      • Make sure everything else is working just fine

       

      It is based on: https://github.com/openmrs/openmrs-core/commit/60d92bda69d0e46bda832e64bfd6b881320f911f#r31850302

        Attachments

          Activity

            People

            Assignee:
            fruether Fred Rue
            Reporter:
            fruether Fred Rue
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: