RFR: 8323605: Java source launcher should not require `--source ...` to enable preview

Christian Stein cstein at openjdk.org
Tue Feb 6 12:06:01 UTC 2024


Please review this PR targeting the source launcher that instead of throwing an error reading _"--enable-preview must be used with --source"_ adds the required compiler arguments on-the-fly.

The add arguments are `--release` and `feature`, with `feature` being the release feature number of the current Java runtime as acquired by `Runtime.version().feature()`.

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

Commit messages:
 - 8323605: Java source launcher should not require `--source ...` to enable preview

Changes: https://git.openjdk.org/jdk/pull/17731/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17731&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8323605
  Stats: 13 lines in 3 files changed: 2 ins; 7 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/17731.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17731/head:pull/17731

PR: https://git.openjdk.org/jdk/pull/17731


More information about the compiler-dev mailing list