RFR: 8316804: Gracefully handle the case where --release is not specified last

Christian Stein cstein at openjdk.org
Wed Nov 13 15:31:00 UTC 2024


Please review this change for the `jar` tool to gracefully handle the case where `--release` is not specified as the last arguments.

Prior to this commit, operation modes `-d --describe-module` and `--validate` expected to read the optional `--release` option as a file argument: `jar -d -f a.jar --release 9`
By adding a hidden GNU-style `--release` option, processing the optional arguments before in those two operation modes, the position is now no longer required to trail behind the `-f --file` option: `jar -d --release 9 -f a.jar`

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

Commit messages:
 - 8316804: Gracefully handle the case where --release is not specified last

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

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


More information about the core-libs-dev mailing list