RFR: JDK-8260694: (fc) Add apiNote to FileChannel.transferFrom to better describe "no bytes available" case

Hamlin Li mli at openjdk.java.net
Wed Feb 3 05:32:50 UTC 2021


On Tue, 2 Feb 2021 01:05:53 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> We'd better put more detailed messages in FileChannel.transferFrom/transferTo that it will not return -1, as we met several cases where developers of framework/program assume that it will return -1 on some error conditions, e.g. EOF of src Channel of transferFrom.
>> 
>> please check more details in JDK-8260486, and discussion in https://mail.openjdk.java.net/pipermail/nio-dev/2021-January/008094.html
>
> interesting, why it keeps failing? I just modified the javadoc in the patch. is this an environment issue?

@AlanBateman @bplb Hi Alan, Brian, do you know how can I avoid the failures in pre-submit tests? I don't think my patch will introduce the failures, any clue or suggestion?
Thanks

-------------

PR: https://git.openjdk.java.net/jdk/pull/2329


More information about the nio-dev mailing list