RFR: 8300237: Minor improvements in MethodHandles [v3]

Sergey Tsypanov stsypanov at openjdk.org
Tue Jan 17 21:24:39 UTC 2023


On Tue, 17 Jan 2023 20:51:06 GMT, Rémi Forax <forax at openjdk.org> wrote:

>> Sergey Tsypanov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Polishing
>
> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 59:
> 
>> 57: import java.nio.ByteOrder;
>> 58: import java.security.ProtectionDomain;
>> 59: import java.util.*;
> 
> oops

Reverted

> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 6747:
> 
>> 6745:                 .max(Comparator.comparing(MethodType::parameterCount))
>> 6746:                 .map(MethodType::ptypes)
>> 6747:                 .map(longest -> List.of(Arrays.copyOfRange(longest, skipSize, longest.length)))
> 
> i think you can fuse these two map() calls

Done!

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

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


More information about the core-libs-dev mailing list