RFR: 8335638: Calling VarHandle.{access-mode} methods reflectively throws wrong exception
Paul Sandoz
psandoz at openjdk.org
Wed Jul 3 21:34:18 UTC 2024
On Wed, 3 Jul 2024 19:43:05 GMT, Hannes Greule <hgreule at openjdk.org> wrote:
> Similar to how `MethodHandle#invoke(Exact)` methods are already handled, this change adds special casing for `VarHandle.{access-mode}` methods.
>
> The exception message is less exact, but I think that's acceptable.
src/hotspot/share/prims/methodHandles.cpp line 1371:
> 1369: * invoked directly.
> 1370: */
> 1371: JVM_ENTRY(jobject, VH_UOE(JNIEnv* env, jobject mh, jobjectArray args)) {
Suggestion:
JVM_ENTRY(jobject, VH_UOE(JNIEnv* env, jobject vh, jobjectArray args)) {
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20015#discussion_r1664836522
More information about the core-libs-dev
mailing list