RFR: JDK-8282798 java.lang.runtime.Carrier [v10]
Rémi Forax
forax at openjdk.java.net
Mon Mar 21 06:33:38 UTC 2022
On Mon, 21 Mar 2022 05:17:31 GMT, ExE Boss <duke at openjdk.java.net> wrote:
>> Jim Laskey has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Typos
>> - Update Carrier.java
>> - Redo API to use list, bring Carrier.component back
>
> src/java.base/share/classes/java/lang/runtime/Carrier.java line 309:
>
>> 307: static {
>> 308: LOOKUP = MethodHandles.lookup();
>> 309: UNSAFE = Unsafe.getUnsafe();
>
> It might be better to use `java.lang.invoke.MethodHandleStatics.UNSAFE`, and probably also `java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP`.
The package is java.lang.runtime not java.lang.invoke so both fields are not accessible.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7744
More information about the core-libs-dev
mailing list