[shrinkwrap-issues] [JBoss JIRA] Resolved: (SHRINKWRAP-101) If InputStream.close() fails, OutStream is not closed

Andrew Lee Rubinger (JIRA) jira-events at lists.jboss.org
Tue Dec 22 10:30:30 EST 2009


     [ https://jira.jboss.org/jira/browse/SHRINKWRAP-101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Lee Rubinger resolved SHRINKWRAP-101.
--------------------------------------------

    Fix Version/s: 1.0.0-alpha-3
       Resolution: Done


> If InputStream.close() fails, OutStream is not closed
> -----------------------------------------------------
>
>                 Key: SHRINKWRAP-101
>                 URL: https://jira.jboss.org/jira/browse/SHRINKWRAP-101
>             Project: ShrinkWrap
>          Issue Type: Bug
>    Affects Versions: 1.0.0-alpha-2
>            Reporter: Andrew Lee Rubinger
>            Assignee: Andrew Lee Rubinger
>             Fix For: 1.0.0-alpha-3
>
>
> IOUtil has:
> /**
>     * Copies the contents from an InputStream to an OutputStream and closes both streams.
>     * 
>     * @param input
>     * @param output
>     */
>    public static void copyWithClose(InputStream input, OutputStream output)
>    {
>       try
>       {
>          copy(input, output);
>       }
>       finally
>       {
>          try
>          {
>             input.close();
>             output.close();
>          }
>          catch (final IOException ignore)
>          {
>          }
>       }
>    }
> Attempt a close on "output" in a separate block.  Some logging at trace level on IOExceptions couldn't hurt either.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the shrinkwrap-issues mailing list