[jdk24] RFR: 8347646: module-info classfile missing the preview flag
Jan Lahoda
jlahoda at openjdk.org
Tue Jan 14 12:12:16 UTC 2025
Hi all,
This pull request contains a backport of commit [bb93f67e](https://github.com/openjdk/jdk/commit/bb93f67ea8955216e81d1aef58d0ec8bf1fc9bb1) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.
The commit being backported was authored by Jan Lahoda on 14 Jan 2025 and was reviewed by Adam Sotona.
Thanks!
Original description:
Consider module-info.java like this:
module m {
requires transitive java.base;
}
When compiled with `--enable-preview --source 24/25`, the resulting classfile is missing the preview flag.
This PR proposes to use `Preview.checkSourceLevel` to check the source level, which marks the source to use the preview feature.
-------------
Commit messages:
- Backport bb93f67ea8955216e81d1aef58d0ec8bf1fc9bb1
Changes: https://git.openjdk.org/jdk/pull/23101/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23101&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8347646
Stats: 99 lines in 4 files changed: 81 ins; 9 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/23101.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23101/head:pull/23101
PR: https://git.openjdk.org/jdk/pull/23101
More information about the compiler-dev
mailing list