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

Brian Burkhalter bpb at openjdk.java.net
Fri Apr 29 23:12:45 UTC 2022


On Fri, 29 Apr 2022 22:37:32 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>>> Perhaps `if (!Arrays.equals(incoming, 0, size, expected, 0, size))...`
>> 
>> I think here the simpler `Arrays.equals(byte[],byte[])` can be used.
>
>> Agree but I would take it further and create a utility method so that it is reusable as it looks like you could take advantage of it later in the test(around line 175)
> 
> I think that if line 124 and after uses the simpler `Arrays.equals(byte[],byte[])` then such a utility method would be less useful.

Fixed by commit c72b4b58f57d998423fb94b17ac950185109b933.

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

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


More information about the nio-dev mailing list