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

Multithreaded correctness - Call to static DateFormat

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Non-Essential
    • Resolution: Fixed
    • Affects Version/s: Platform 1.11.0
    • Fix Version/s: Platform 2.0.0
    • Component/s: None
    • Complexity:
      Low

      Description

      As the JavaDoc states, DateFormats are inherently unsafe for multithreaded use. The detector has found a call to an instance of DateFormat that has been obtained via a static field. This looks suspicous.
      For more information on this see Sun Bug #6231579 and Sun Bug #6178997.

      Reported Classes:
      Obs (lines 1014, 1106, etc.), PatientProgramItem, MigrationHelper, FormUtil.

      Acceptance Criteria
      Eliminate all errors reported by Sonar for this rule:
      https://ci.openmrs.org/sonar/drilldown/issues/1865?&rule=findbugs%3ASTCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE&rule_sev=CRITICAL&severity=CRITICAL

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              macorrales MA Corrales
              Reporter:
              raff Rafal Korytkowski
              Designated Committer:
              Rafal Korytkowski
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Time Spent - 2 hours Remaining Estimate - 2 hours
                  2h
                  Logged:
                  Time Spent - 2 hours Remaining Estimate - 2 hours
                  2h