[foreign-preview] RFR: 8280527: Move jdk.incubator.foreign to java.lang.foreign
Rémy Maucherat
remm at apache.org
Mon Jan 31 16:19:13 UTC 2022
On Mon, Jan 24, 2022 at 5:42 PM Julia Boes <jboes at openjdk.java.net> wrote:
>
> To prepare for preview, this change removes the jdk.incubator.foreign module and moves the public classes to java.base/java.lang.foreign, implementation classes to java.base/jdk.internal.foreign respectively.
>
> While here, `SystemLookup` is replaced with the method `ClassLoader::findNative` and the methods in `MemoryHandles` are moved to `MethodHandles`. The `@PreviewFeature(feature=PreviewFeature.Feature.FOREIGN)` annotation and the `--enable-preview` flag are added were needed.
>
> -------------
>
> Commit messages:
> - remove leftover jdk.incubator files and fix some test config
> - Merge branch 'foreign-preview' into foreign-preview-move-to-java-base
> - Merge branch 'foreign-memaccess+abi' into foreign-preview-premerge
> - remove patch file
> - remove leftover jdk.incubator files
> - intital commit
>
> Changes: https://git.openjdk.java.net/panama-foreign/pull/633/files
> Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=633&range=00
> Issue: https://bugs.openjdk.java.net/browse/JDK-8280527
> Stats: 9257 lines in 296 files changed: 3448 ins; 4422 del; 1387 mod
> Patch: https://git.openjdk.java.net/panama-foreign/pull/633.diff
> Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/633/head:pull/633
>
> PR: https://git.openjdk.java.net/panama-foreign/pull/633
Tested with a port from Java 18 to the new API, works as expected with
--enable-preview and --enable-native-access=
I don't dislike the java.lang.foreign package name personally, of
course I have no issue if this changes again.
Thanks,
Rémy
More information about the panama-dev
mailing list