struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paolo Perliti (JIRA)" <j...@apache.org>
Subject [jira] [Created] (WW-4673) InputFileStream not closed in Stream results
Date Mon, 01 Aug 2016 10:19:20 GMT
Paolo Perliti created WW-4673:
---------------------------------

             Summary: InputFileStream not closed in Stream results
                 Key: WW-4673
                 URL: https://issues.apache.org/jira/browse/WW-4673
             Project: Struts 2
          Issue Type: Bug
          Components: Core Results
    Affects Versions: 2.5
            Reporter: Paolo Perliti


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

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

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message