6984545: (fc) transferFrom does not throw NonReadableChannelException when target is size 0 and non-readable
Alan Bateman
Alan.Bateman at oracle.com
Tue Sep 14 15:45:15 PDT 2010
The changes for 6431344 introduced a small regression. If FileChannel's
transferFrom is invoked with a source that is non-readable FileChannel
then NonReadableChannelException is not thrown when there are no bytes
to transfer. The fix is to trivially check if the source is readable:
http://cr.openjdk.java.net/~alanb/6984545/webrev/
Thanks,
Alan.
[1] http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/f4a2b4e7a831
More information about the nio-dev
mailing list