On Mon, 12 Dec 2022 20:53:27 GMT, Ian Graves <igra...@openjdk.org> wrote:
>> This is an approach to adding a flag to jlink that will allow --compress to >> take the same types of arguments as jmod, thus bringing the two into >> alignment. This likely requires a CSR and a discussion on whether we should >> deprecate or simply remove the original numeric compression arguments. > > 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? 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`? src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ZipPlugin.java line 49: > 47: > 48: private static final int DEFAULT_COMPRESSION = 6; > 49: private int compressionLevel; Perhaps we could mark this as `final`? ------------- PR: https://git.openjdk.org/jdk/pull/11617