RFR: 8321139: jlink's compression plugin doesn't handle -c option correctly [v3]
Alan Bateman
alanb at openjdk.org
Wed Nov 26 15:22:14 UTC 2025
On Fri, 21 Nov 2025 18:57:01 GMT, Ana Maria Mihalceanu <duke at openjdk.org> wrote:
>> `{ }` is use in some man pages pick one from the items from inside the braces. Maybe `zip-{0..9}` would work here as the `jlink` man page already uses `[ ]` for optional items.
>
> The message showed when running `jlink --help` option mentions `zip-[0-9]`. In my current approach, I kept that implementation aligned with what help would show when running the `jlink --help` command (same approach regarding `jlink --list-plugins` output).
>
>
> jlink --help
>
> Possible options include:
> --add-modules <mod>[,<mod>...] Root modules to resolve in addition to the
> initial modules. <mod> can also be ALL-MODULE-PATH.
> --bind-services Link in service provider modules and
> their dependencies
> --compress <compress> Compression to use in compressing resources:
> Accepted values are:
> zip-[0-9], where zip-0 provides no compression,
> and zip-9 provides the best compression.
> Default is zip-6.
> Deprecated values to be removed in a future release:
> 0: No compression. Use zip-0 instead.
> 1: Constant String Sharing
> 2: ZIP. Use zip-6 instead.
>
>
> I did not intervene over the output of `jlink -- list-plugins`.
>
>
> jlink --list-plugins
>
> List of available plugins:
> --add-options <options> Prepend the specified <options> string, which may
> include whitespace before any other options when
> invoking the virtual machine in the resulting image.
> --compress <compress> Compression to use in compressing resources:
> Accepted values are:
> zip-[0-9], where zip-0 provides no compression,
> and zip-9 provides the best compression.
> Default is zip-6.
>
> Given the situations mentioned above, what do you believe to be the best way forward? 🙏
`[ ]` usually means optional so I think it would be better to just change it from `{0|1|2}` to `zip-{0-9}`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28359#discussion_r2565415295
More information about the core-libs-dev
mailing list