RFR: 8325949: Create an internal utility method for creating VarHandle instances [v3]

Kasper Nielsen duke at openjdk.org
Tue Sep 17 12:37:05 UTC 2024


On Tue, 17 Sep 2024 12:17:06 GMT, Chen Liang <liach at openjdk.org> wrote:

> I think the original poster means to find a VH in the lookup class.

I actually meant what Per is hinting at. Defining static MethodHandle/VarHandle in a class at class initialization time, without the ceremony of handling ReflectiveOperationException and throwing ExceptionInInitializerError. 

I could be mistaken but I think this is probably how most MethodHandle/VarHandles are defined.
But I understand reason not to add these methods.

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

PR Comment: https://git.openjdk.org/jdk/pull/20972#issuecomment-2355614436


More information about the core-libs-dev mailing list