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

Alan Bateman Alan.Bateman at oracle.com
Thu Apr 9 12:00:46 UTC 2020


On 08/04/2020 21:28, Brian Burkhalter 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.
>
Keeping it consistent is good and the changes in the webrev look okay. 
The ordering of the exceptions in the javadoc should never be 
interpreted as the ordering of checks when there are several possible 
error conditions.

I don't see anything in the webrev to inherit the text from super 
interfaces, are doing that with a separate issue?

-Alan


More information about the nio-dev mailing list