RFR: 8294437: java/nio/channels/FileChannel tests slow on Windows [v2]

Brian Burkhalter bpb at openjdk.org
Fri Sep 30 15:03:25 UTC 2022


On Fri, 30 Sep 2022 06:03:13 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> test/jdk/java/nio/channels/FileChannel/Transfer2GPlus.java line 140:
>> 
>>> 138: 
>>> 139:             long n;
>>> 140:             if ((n = srcCh.transferTo(0, LENGTH, wbc)) < LENGTH)
>> 
>> The contract of `FileChannel::transferTo` does not guarantee that all bytes are transferred:
>> 
>> ```An invocation of this method may or may not transfer all of the requested bytes [...]```.
>
> preexisting, and unlikely to change because of Hyrum's law. I can file a ticket to update the docs if you think it makes sense.

No, I think the docs should be left as they are.

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

PR: https://git.openjdk.org/jdk/pull/10464


More information about the nio-dev mailing list