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

Henry Jen henryjen at openjdk.org
Tue Oct 1 17:23:36 UTC 2024


On Mon, 30 Sep 2024 15:51:43 GMT, Lance Andersen <lancea 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.
>
>> 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...

OK, I will add a message. The other option I am talking about is specific mode options, like compression or manifest instead of main options.

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

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


More information about the compiler-dev mailing list