RFR 8156485 MethodHandles.varHandleExactInvoker should perform exact checks

Paul Sandoz paul.sandoz at oracle.com
Tue May 10 13:36:07 UTC 2016


Hi,

Please review:

  http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8156486-varHandleExactInvoker/webrev/

A bug slipped in with recent VarHandle implementation improvements, and this was not caught by relevant tests. The MethodHandle returned from MethodHandles.varHandleExactInvoker performed an incorrect match using erased signatures. Ooops.

I fixed this by consolidating the lambda form generation for exact and generic VH invokers.

The tests are also updated, primarily to VarHandleTestMethod* (changes to other areas are minor clean ups) to correctly test the 4 ways to obtain a MethodHandle to a VarHandle access mode method, and to correctly differentiate between testing exact and generic invocation.

Thanks,
Paul.



More information about the core-libs-dev mailing list