RFR(2nd): 8017513: Support for closeable streams

Henry Jen henry.jen at oracle.com
Wed Sep 4 07:38:36 UTC 2013

On 09/04/2013 12:17 AM, Alan Bateman wrote:
> On 03/09/2013 20:02, Henry Jen wrote:
>> Updated webrev is at
>> http://cr.openjdk.java.net/~henryjen/ccc/8017513/2/webrev/
>> Addressed comments from Alan and catch IOExpression when close on
>> exception in Files method.
> Thanks for sorting out the suppressed exception issue. I notice you've
> added code to catch Throwable if addSuppressed fails. Is this out of
> concern for OOME (I assume not IAE ias it can't happen here)?

Just to be on the safe side to ensure the first exception is thrown
without surprise. For Files case, I don't think IAE or NPE could happen.
Similar pattern is implemented for Streams.composeXX method, where it is
less certain.


More information about the core-libs-dev mailing list