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

ImageHandler.saveObs(Obs) to close outfile

    Details

    • Complexity:
      Low

      Description

      ImageHandler creates a new File ready to be written to in order to write the image data to disk:

      File outfile = getOutputFileToWrite(obs);
      

      However, unlike what's done with some other handlers such as BinaryDataHandler, it is never closed.

      Whenever an IOException is raised, outFile remains open and we end up with a 0 size file lingering on the disk that is not associated with any complex obs: a ghost empty file.

      There is no workaround for this. Those 0 sizes occurrences have to be spotted and deleted manually.

        Gliffy Diagrams

          Attachments

            Attachments-Category-Modification

              Activity

                People

                • Assignee:
                  mksd Dimitri R
                  Reporter:
                  mksd Dimitri R
                  Watchers:
                  Daniel Kayiwa, Dimitri R
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: