Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4673

InputFileStream not closed in Stream results

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5.5
    • Component/s: Core Results
    • Labels:
      None
    • Flags:
      Important

      Description

      In StreamResult's versions prior to 2.5 the input stream was correctly closed:

      try {
         get inputStream
         if (inputStream == null)
              throw Exception
         get outputStream
      } finally {
         if inputStream != null inputStream.close()
         if outputStream != null outputStream.close()
      }
      

      Starting from version 2.5 input stream is not closed anymore. This breaks compatibility for applications that relied on this hook:
      http://stackoverflow.com/questions/4693968/is-there-an-existing-fileinputstream-delete-on-close

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              pperliti Paolo Perliti
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development