RFR: 8274112: (fc) Tune FileChannel.transferTo() [v2]

Brian Burkhalter bpb at openjdk.java.net
Wed Sep 22 20:10:57 UTC 2021


On Wed, 22 Sep 2021 16:33:58 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java line 559:
>> 
>>> 557:         int thisFDVal = IOUtil.fdVal(fd);
>>> 558:         int targetFDVal = IOUtil.fdVal(targetFD);
>>> 559:         if (thisFDVal != -1 && targetFDVal != -1 && thisFDVal == targetFDVal)
>> 
>> How can the fd values be -1 here, we must have an issue somewhere else if this happens.
>
> On Windows this can happen.

Removed in second commit.

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

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


More information about the nio-dev mailing list