RFR 8190500: (ch) ReadableByteChannelImpl::read and WritableByteChannelImpl::write might not throw ClosedChannelException as specified
Alan Bateman
Alan.Bateman at oracle.com
Fri Nov 3 16:39:58 UTC 2017
On 03/11/2017 15:45, Brian Burkhalter wrote:
>
> On Nov 3, 2017, at 5:04 AM, Alan Bateman <Alan.Bateman at oracle.com
> <mailto:Alan.Bateman at oracle.com>> wrote:
>
>> It might be better to put the fos.close and fis.close into a finally
>> block, or else else using try-with-resources in both methods. They
>> aren't of course strictly needed but you've invited the question by
>> allowing for the possibility that wbc/rbc.close doesn't close the
>> underlying stream.
>
> So updated. Please see
> http://cr.openjdk.java.net/~bpb/8190500/webrev.02/
> <http://cr.openjdk.java.net/%7Ebpb/8190500/webrev.02/>.
>
Looks fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20171103/349ff2c5/attachment.html>
More information about the nio-dev
mailing list