RFR: 8336468: Reflection and MethodHandles should use more precise initializer checks [v4]

Aleksey Shipilev shade at openjdk.org
Wed Sep 25 15:53:19 UTC 2024


On Wed, 25 Sep 2024 15:32:33 GMT, Chen Liang <liach at openjdk.org> wrote:

>> You mean the _assert_ is excessive, or something else? I think it is within the spec to return method for `clinit`-s, since clinits are logically not constructors.
>
> Then this assert seems excessive. If JNI users get the method slot (presumably through some hacks) for a `<clinit>` then JNI has to return the `<clinit>` and this assert doesn't stand.

OK, I replaced the assert with a comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20192#discussion_r1775488883


More information about the hotspot-dev mailing list