[jdk24] Integrated: 8347646: module-info classfile missing the preview flag
Jan Lahoda
jlahoda at openjdk.org
Wed Jan 15 05:17: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.
This pull request has now been integrated.
Changeset: 6965840e
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/6965840e0dd497325fe1c924c281aa6fde4611fc
Stats: 99 lines in 4 files changed: 81 ins; 9 del; 9 mod
8347646: module-info classfile missing the preview flag
Reviewed-by: asotona
Backport-of: bb93f67ea8955216e81d1aef58d0ec8bf1fc9bb1
-------------
PR: https://git.openjdk.org/jdk/pull/23101
More information about the compiler-dev
mailing list