RFR: 8303884: jlink --add-options plugin does not allow GNU style options to be provided [v3]

Henry Jen henryjen at openjdk.org
Wed Jan 8 00:40:04 UTC 2025


> Improving option value handling to support passing argument value starts with "--".
> 
> Before the fix, in following example, --add-modules will be considered as another option for JLink instead of argument value for --add-options.
> --add-options --add-modules=jdk.incubator.concurrent
> --add-options=--add-modules=jdk.incubator.concurrent
> 
> will cause JLink to report
> Error: no value given for --add-options
> as --add-modules is considered another option for JLink.
> 
> After the fix, by using = will ensure the value is properly handled as argument value. Also using "" with multiple values will be recognized properly. So following form should work
> --add-options "--add-modules jdk.incubator.concurrent"
> --add-options=--add-modules=jdk.incubator.concurrent

Henry Jen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:

 - Merge remote-tracking branch 'openjdk/master' into JDK-8303884
 - Use opt=value format when value is starting with --
 - Fix style
 - add test
 - 8303884: jlink --add-options plugin does not allow GNU style options to be provided

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22526/files
  - new: https://git.openjdk.org/jdk/pull/22526/files/7dbc99f9..7060e47f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22526&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22526&range=01-02

  Stats: 55020 lines in 3799 files changed: 35891 ins; 10199 del; 8930 mod
  Patch: https://git.openjdk.org/jdk/pull/22526.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22526/head:pull/22526

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


More information about the core-libs-dev mailing list