On Mon, 21 Mar 2022 07:29:21 GMT, ExE Boss <d...@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

Reply via email to