[shrinkwrap-issues] [JBoss JIRA] Created: (SHRINKWRAP-101) If InputStream.close() fails, OutStream is not closed
Andrew Lee Rubinger (JIRA)
jira-events at lists.jboss.org
Sat Dec 5 22:43:30 EST 2009
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
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