RFR: 8347646: module-info classfile missing the preview flag

Adam Sotona asotona at openjdk.org
Tue Jan 14 10:22:46 UTC 2025


On Tue, 14 Jan 2025 09:27:01 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> 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.

Looks good to me.

-------------

Marked as reviewed by asotona (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23097#pullrequestreview-2549315386


More information about the compiler-dev mailing list