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

Bad practice - Method may fail to close database resource

    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

      Sonar Description:
      The method creates a database resource (such as a database connection or row set), does not assign it to any fields, pass it to other methods, or return it, and does not appear to close the object on all paths out of the method. Failure to close database resources on all paths out of a method may result in poor performance, and could cause the application to have problems communicating with the database.

      Reported Classes:
      InitializationFilter (952, 1134), FilterUtil, UpdateFilter

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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                yousefhamza Yousef Hamza
                Reporter:
                raff Rafal Korytkowski
                Designated Committer:
                Rafal Korytkowski
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 4 hours
                    4h
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 2 hours Time Not Required
                    2h