XMLWordPrintable

    Details

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

      Description

      Case:
      The possibility of simplifying the code of the isStringInArray method in the OpenmrsUtil class.

      Current state:
      The retVal variable is created and assigned the value true if string is found. At the same time, the method continues to search, even though it has already found.

      Solution:
      Delete the retVal variable and add "return true" if the string is found and "return false" if the array ends because that means the string was not found.

      Link to place in code:
      https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/util/OpenmrsUtil.java#L182-L191

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              navareth Bartłomiej Rasztabiga
              Reporter:
              sacull Lukasz Debicki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: