RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v2]
Ian Graves
igraves at openjdk.org
Mon Jan 9 20:41:56 UTC 2023
On Thu, 15 Dec 2022 06:43:40 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Ian Graves has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Swapping deprecations in properties
>
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java line 27:
>
>> 25: package jdk.tools.jlink.internal.plugins;
>> 26:
>> 27: import java.text.NumberFormat;
>
> I suspect this is an unused import?
Yes thank you.
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/DefaultCompressPlugin.java line 111:
>
>> 109: zip = new ZipPlugin(resFilter, zipLevel);
>> 110: break;
>> 111: } catch (NumberFormatException ignored) {}
>
> Hello Ian, previously before this change (and even now for non `zip-` values) we throw an `IllegalArgumentException` if the value for compression level is incorrect. Should we do the same for wrong values of `zip-` and throw `IllegalArgumentException` when we catch a `NumberFormatException`?
Yes, though in this case when we catch a NumberFormatException, the result falls through to the IllegalArgumentException and prints the offending level ("zip-*") value.
-------------
PR: https://git.openjdk.org/jdk/pull/11617
More information about the core-libs-dev
mailing list