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

Refactor OpenmrsUtil.copyFile

    XMLWordPrintable

    Details

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

      Description

      Replace implementation of OpenmrsUtil.copyFile(inputStream, outputStream)

      with the apache commons IOUtils.copy(inputStream, outputStream)

      using try-with-resource we can make sure the outputStream is closed like its done in the current implementation.

      This would reduce the code by using the well tested/often used apache commons IOUtils which this class already depends on.

      And OpenmrsUtil.copyFile() isnt tested.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lkukielka Leszek Kukiełka
              Reporter:
              teleivo Ivo Ulrich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days, 1 hour, 30 minutes
                  4d 1h 30m