RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

Chen Liang liach at openjdk.org
Sat May 17 14:39:01 UTC 2025


On Sat, 17 May 2025 14:32:43 GMT, ExE Boss <duke at openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   We no longer load DelegateMH as we no longer rebind
>
> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 4893:
> 
>> 4891:      * @return a constant method handle of the given type, which returns a default value of the given return type
>> 4892:      * @throws NullPointerException if the argument is null
>> 4893:      * @see MethodHandles#primitiveZero
> 
> `MethodHandles​.primitiveZero(…)` is a private internal API.
> Suggestion:
> 
>      * @see MethodHandles#zero

There's a general rfe for checking inaccessible links. Don't recall why thisv was even changed, most likely ide being too smart.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23706#discussion_r2094138728


More information about the core-libs-dev mailing list