RFR: 8321139: jlink's compression plugin doesn't handle -c option correctly [v3]
Ana Maria Mihalceanu
duke at openjdk.org
Wed Nov 26 19:53:57 UTC 2025
On Wed, 26 Nov 2025 15:19:22 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> 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}`.
Thank you, Alan. I updated the PR and CSR according to your latest feedback.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28359#discussion_r2566324169
More information about the core-libs-dev
mailing list