Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5435

Improve Java 8 streams usage on Cohort.getActiveMembership(Patient)

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: Could
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Platform 2.2.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      In this method we do filter -> collect -> get. Instead this should do filter -> findFirst -> get. (This would be potentially a bit more efficient.)

      https://github.com/openmrs/openmrs-core/blob/2.1.3/api/src/main/java/org/openmrs/Cohort.java#L215

       

        Attachments

          Activity

            People

            • Assignee:
              fungucide Will Fu
              Reporter:
              darius Darius Jazayeri [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: