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

globalPropertyChanged catches all exceptions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.2.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      GlobaleLocaleList.globalPropertyChanged catches all exceptions without doing anything with them

      https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/api/impl/GlobalLocaleList.java#L35-L44

      https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html#Locale-java.lang.String-

      constructors only throw NullPointerException when passed null and no exception when passed in a language, country, variant that is not recognized.

      I therefore suggest to remove the try/catch

        Attachments

          Activity

            People

            • Assignee:
              pkatopenmrs pkatopenmrs
              Reporter:
              teleivo Ivo Ulrich
              Designated Committer:
              shravan ramamuthy
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h