Re: 8241952: (fs) FileChannel.write​(ByteBuffer src, long position) does not check for the FileChannel being closed first

Lance Andersen lance.andersen at oracle.com
Wed Apr 8 21:02:49 UTC 2020


Hi Brian,

I am wondering if the main javadoc for  FileChannel should indicate that a check to see that the channel is open is the first thing done.

Thoughts?

Best
Lance

> On Apr 8, 2020, at 4:28 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> 
> To address [1] please see [2]. The same thing applies to FileChannel.read(ByteBuffer,long). It is not clear whether the exceptions should be expected in the order documented. If so, an alternative would be to change the documentation.
> 
> I noticed that the documentation of the FileChannel methods implementing {Scattering,Gathering}ByteChannel does not inherit all the throws cases documented in these latter interfaces.
> 
> Thanks,
> 
> Brian
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8241952
> [2] http://cr.openjdk.java.net/~bpb/8241952/webrev.00/

 <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200408/6290a5a2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200408/6290a5a2/oracle_sig_logo.gif>


More information about the nio-dev mailing list