On Tue, 19 Oct 2021 01:09:26 GMT, Hai-May Chao <hc...@openjdk.org> wrote:
>> It'd be useful to have a -version option for keytool and jarsigner. Many >> other JDK tools already have a -version option. This is to add -version >> option to keytool and jarsigner like jar command does. >> >> CSR review: >> https://bugs.openjdk.java.net/browse/JDK-8275174 > > Hai-May Chao has updated the pull request incrementally with one additional > commit since the last revision: > > Fix -version in jarsigner and update tests src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java line 314: > 312: if (version) { > 313: doPrintVersion(); > 314: } So if both `-version` and `file.jar` are provided, jarsigner will both sign the jar and print the version. This is probably OK but I prefer the `java` style that only prints the version. ------------- PR: https://git.openjdk.java.net/jdk/pull/5954