XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Could
    • Resolution: Fixed
    • None
    • Core 2.5.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: