https://bz.apache.org/bugzilla/show_bug.cgi?id=60713

--- Comment #3 from Javen O'Neal <one...@apache.org> ---
There should only be a problem if the OutputStream's close method follows the
AutoCloseable interface and is not idempotent, where subsequent calls to close
have visible side effects.

At the creation of these classes and prior to Java 7, OutputStream implemented
the Closeable interface, which requires subsequent calls to close to have no
effect.

We must balance that with users forgetting to close their own input streams and
leaking resources (though that's on them). If we change POI to no longer close
user-opened OutputStreams, we should document this changed behavior in both the
Javadocs and changelog, making sure to update all of our POI example code and
website to close the provided stream (that'd be a good idea anyways).

https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html#close()

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to