Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5845 Search and fix minor errors and typos
  3. TRUNK-5860

Change of object type to primitive in class FilterUtil

    XMLWordPrintable

    Details

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

      Description

      Case:
      The readSystemDefaultLocale method uses a Boolean variable, but it can use primitive because it is an internal variable. In addition, in the "if" condition it is compared to the result of the comparison, which returns a primitive.

      Conclusions:
      Changing from Boolean to boolean can improve memory usage.

      Link to place of creation:
      https://github.com/openmrs/openmrs-core/blob/master/web/src/main/java/org/openmrs/web/filter/util/FilterUtil.java#L133

      Link to place of use:
      https://github.com/openmrs/openmrs-core/blob/master/web/src/main/java/org/openmrs/web/filter/util/FilterUtil.java#L153

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              sacull Lukasz Debicki
              Reporter:
              sacull Lukasz Debicki
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: