On Fri, 13 Sep 2024 12:40:33 GMT, Chen Liang <[email protected]> wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Rename and reformat
>
> src/java.base/share/classes/jdk/internal/reflect/MethodHandlesInternal.java
> line 50:
>
>> 48: private MethodHandlesInternal() {}
>> 49:
>> 50: public static VarHandle findVarHandle(MethodHandles.Lookup lookup,
>
> Do you think we should create a 3-arg overload like `Lookup lookup, String
> name, Class<?> type` that calls `findVarHandle(lookup, lookup.lookupClass(),
> name, type);` for ease of use at many call sites?
The pro: Simpler code at the call site. The con: it is a bit magic.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20972#discussion_r1758999490