RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

Lance Andersen lancea at openjdk.org
Mon Sep 30 15:54:35 UTC 2024


On Mon, 30 Sep 2024 15:09:21 GMT, Henry Jen <henryjen at openjdk.org> wrote:

> I considered that, but didn't implement it after confirmed other similar options didn't display any warning. I do think it make sense to show a warning when using an option not valid in specific mode.

We do display a warning/error is some cases:  For example when we specify 'c' and 'x' we get the following message


jar cxvf foo.jar
You may not specify more than one '-cuxtid' options
Try `jar --help' for more information.


given '-k' is only relevant when used with the  '-x' option, we could specify a warning (or indicate it is ignored...

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21141#discussion_r1781381620


More information about the core-libs-dev mailing list