[jdk24] RFR: 8347646: module-info classfile missing the preview flag
Adam Sotona
asotona at openjdk.org
Tue Jan 14 12:43:39 UTC 2025
On Tue, 14 Jan 2025 12:07:16 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> 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.
Marked as reviewed by asotona (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/23101#pullrequestreview-2549600201
More information about the compiler-dev
mailing list