RFR: 8267421: j.l.constant.DirectMethodHandleDesc.Kind.valueOf(int) implementation doesn't conform to the spec regarding REF_invokeInterface handling
Vicente Romero
vromero at openjdk.java.net
Thu Jun 10 17:16:50 UTC 2021
On Wed, 9 Jun 2021 17:22:30 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> Looks like the test does not verify the cases specified by `valueOf(int refKind, boolean isInterface)`.
> i.e. For most values of refKind, there is an exact match regardless of the value of isInterface except `REF_invokeStatic` and `REF_invokeSpecial`.
>
> Do you mind adding those cases?
hum, the spec for `valueOf(int refKind, boolean isInterface)` is incorrect, the behavior does depends on the value of `isInterface` for example: `Kind.valueOf(1, false)` returns GETTER while `Kind.valueOf(1, true)` fails with `java.lang.IllegalArgumentException` will fix the implementation of `valueOf(int refKind, boolean isInterface)` for it to match its spec
-------------
PR: https://git.openjdk.java.net/jdk/pull/4416
More information about the core-libs-dev
mailing list