RFR: 8272347: ObjectMethods::bootstrap should specify NPE if any argument except lookup is null [v3]
Vicente Romero
vromero at openjdk.java.net
Mon Aug 30 20:00:56 UTC 2021
On Mon, 30 Aug 2021 01:45:49 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>>
>> clarifying that the names parameter is ignored in some cases
>
> src/java.base/share/classes/java/lang/runtime/ObjectMethods.java line 345:
>
>> 343: Arrays.stream(getters).forEach(Objects::requireNonNull);
>> 344: MethodType methodType;
>> 345: if (type instanceof MethodType)
>
> Since you are modifying this file, do you mind taking Jesper's suggestion [1] posted in another PR to use pattern matching.
>
> Suggestion:
>
> if (type instanceof MethodType mt)
> methodType = mt;
>
>
> [1] https://github.com/openjdk/valhalla/pull/528#discussion_r688100918
sure I will do this before pushing, thanks
-------------
PR: https://git.openjdk.java.net/jdk/pull/5226
More information about the core-libs-dev
mailing list