[foreign-memaccess+abi] RFR: 8273905: Foreign API refresh [v4]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Mon Sep 20 10:26:54 UTC 2021
On Sat, 18 Sep 2021 21:15:26 GMT, Uwe Schindler <uschindler at openjdk.org> wrote:
>> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryHandles.java line 183:
>>
>>> 181: * <blockquote><pre>{@code
>>> 182: MemorySegment segment = MemorySegment.allocateNative(2, ResourceScope.newConfinedScope());
>>> 183: VarHandle SHORT_VH = ValueLayout.JAVA_SHORT.varHandle(short.class);
>>
>> The parameter `short.class` in this example is obsolete with new API.
>
> There may be other similar problems at other places!
True - always hard to keep samples up to date with API changes - hopefully javadoc snippets will fix this issue :-)
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/576
More information about the panama-dev
mailing list