RFR: 8325382: (fc) FileChannel.transferTo throws IOException when position equals size [v2]
Brian Burkhalter
bpb at openjdk.org
Mon Feb 12 20:03:06 UTC 2024
On Sat, 10 Feb 2024 16:06:35 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8325382: Change sub-test name and check return
>
> test/jdk/java/nio/channels/FileChannel/Transfer.java line 182:
>
>> 180: // FileChannelImpl.MAPPED_TRANSFER_THRESHOLD which is
>> 181: // currently 16384
>> 182: chSource.transferTo(length, 16385, chTarget);
>
> "transferToTrusted" hints that this method will test a trusted target but it's actually a very specific test that doesn't test all trusted scenarios, and doesn't even check the return from transferTo. So I think this one is really a regression test that checks that it doesn't throw.
Attempted to fix in ecd01954da61240c20143bba5348c7cba4d1a2f4.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17796#discussion_r1486705982
More information about the nio-dev
mailing list