There is a new preview language feature, `requires transitive java.base;`. And the `java.se` module is permitted to use the feature, without being marked as preview (i.e. the `java.se` module participates in preview). This is currently implemented by the common "participates in preview" way, by checking that `java.base` is exporting `jdk.internal.javac` package to `java.se`.
This common way works OK for internal preview feature and API usage, but turns out it may not be appropriate for this feature: the qualified export of the `jdk.internal.javac` package is not a specified API, it is an implementation detail; and the JLS itself specifies that the `java.se` module is participating in preview. So this PR proposes to change the way javac handles the `java.se` module: it permits the use of the preview feature based on the module name, instead relying on the internal qualified export. ------------- Commit messages: - Fixing test. - 8344647: JDK-8335989 causes a bad requires flag: ACC_TRANSITIVE error for java.se Changes: https://git.openjdk.org/jdk/pull/22322/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22322&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8344647 Stats: 61 lines in 8 files changed: 51 ins; 4 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/22322.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22322/head:pull/22322 PR: https://git.openjdk.org/jdk/pull/22322