When the JVM of javac runs with -J--enable-preview, javac should still compile against the non-preview class path when it is not passed --enable-preview. We have this hack within InMemoryJavaCompiler that turns out breaks things when we try to fix some javac issues (openjdk/valhalla#2643), because we expect the output bytecode to be stable for transformations.
We should remove this hack, which will break all InMemoryJavaCompiler usage that already pass explicit `--enable-preview` and `-source` options. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Merge branch 'master' of https://github.com/openjdk/jdk into fix/lw-test-inmemoryjavacompiler-preview - Don't make InMemoryJavaCompiler javac preview if just the runtime is preview Changes: https://git.openjdk.org/jdk/pull/32112/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32112&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8388343 Stats: 16 lines in 1 file changed: 0 ins; 16 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/32112.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32112/head:pull/32112 PR: https://git.openjdk.org/jdk/pull/32112
