On Wed, 15 Jul 2026 19:45:02 GMT, Chen Liang <[email protected]> wrote:

> 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 (#2643), because we 
> expect the output bytecode to be stable for transformations.
> 
> Turns out now this change is redundant. Tier 1-6 is clear so far except the 
> known CreateCoreDumpOnCrash.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

I think I will hold this back from JEP 401 integration: 
`test/jdk/java/io/Serializable/records/BadCanonicalCtrTest.java` is being 
addressed on its own.

That said, I think we might still come back to this on mainline, because this 
breaks tests running with `JTREG=JAVA_OPTIONS=--enable-preview` if the test 
runs `InMemoryJavaCompiler.compile` with flags like `"--release", "25"`.

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

PR Comment: https://git.openjdk.org/valhalla/pull/2645#issuecomment-4996724766

Reply via email to