RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v16]
Mandy Chung
mchung at openjdk.org
Wed May 31 00:05:05 UTC 2023
On Fri, 26 May 2023 22:18:17 GMT, Chen Liang <liach at openjdk.org> wrote:
>> If we can avoid implementing `sun.invoke.WrapperInstance`, this package access check issue would go away. Do you think you can look into it?
>
> I think we can probably insert a static final field in a wrapper instance class to point to the implemented class and verify with the `PROXY_CLASS_INFOS` ClassValue, much like VarForm field in VarHandle implementations. This should have less reflective impact than the annotation-based approach, and can be cached in a ClassValue as well. Should we cache it though?
Is it more straight-forward to keep a `ClassValue<Boolean>` and each wrapper instance class has an entry of `TRUE` value; otherwise, `FALSE`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13197#discussion_r1210952258
More information about the core-libs-dev
mailing list