RFR: JDK-8282798 java.lang.runtime.Carrier [v10]
Jim Laskey
jlaskey at openjdk.java.net
Mon Mar 21 12:36:32 UTC 2022
On Mon, 21 Mar 2022 07:29:21 GMT, ExE Boss <duke at openjdk.java.net> wrote:
>> The package is java.lang.runtime not java.lang.invoke so both fields are not accessible.
>
> Well, you could use `SharedSecrets.getJavaLangInvokeAccess().findStatic(…)` and `SharedSecrets.getJavaLangInvokeAccess().findVirtual(…)` in place of `LOOKUP.findStatic(…)` and `LOOKUP.findVirtual(…)`.
Trusted access is not needed, but I can get rid of the LOOKUP static final. The UNSAFE static final is trickier since it might impact the performance of the array getInt.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7744
More information about the core-libs-dev
mailing list