RFR: 8305104: Remove the old core reflection implementation [v3]

ExE Boss duke at openjdk.org
Sun Jun 11 20:51:43 UTC 2023


On Thu, 8 Jun 2023 16:46:55 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> JEP 416 integrated in JDK 18 and since then, only a couple minor issues has been reported.  Those issues were related with exception being thrown with invalid arguments.   We propose to remove the old core reflection implementation in JDK 22.  The `-Djdk.reflect.useDirectMethodHandle=false` workaround to revert to the old implementation will stop to work.
>
> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review feedback

src/java.base/share/classes/jdk/internal/reflect/MethodHandleAccessorFactory.java line 314:

> 312:      * 4. the member takes a variable number of arguments and the last parameter
> 313:      *    is an array (see details below)
> 314:      * 5. the member's method type has an arity >= 255

Suggestion:

     * 1. during VM early startup before method handle support is fully initialized
     * 2. a Java native method
     * 3. -Djdk.reflect.useNativeAccessorOnly=true is set
     * 4. the member takes a variable number of arguments and the last parameter
     *    is not an array (see details below)
     * 5. the member's method type has an arity >= 255

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14371#discussion_r1225921483


More information about the hotspot-dev mailing list