Tr : FileChannel doc

Alan Bateman Alan.Bateman at oracle.com
Tue Oct 2 12:36:43 PDT 2012


On 02/10/2012 19:45, Jeff Hain wrote:
> :
> For example, FileChannelImpl.truncate(long) contains:
>     if (size > size())
>         return this;
>     if (!writable)
>         throw new NonWritableChannelException();
> if size == size() or size > size(), no truncation occurs, but in one case
> NonWritableChannelException might be thrown and in the other not.
I think we have to fix specific one as all checks should be done at the 
start, I'll create a bug for that.

However for cases where more than one exception is possible for the 
given parameters or channel state then tests, conformance tests in 
particular, cannot make any assumptions. Such tests need to be bale to 
handle all possible exceptions for those cases.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20121002/4f34fca0/attachment.html 


More information about the nio-dev mailing list