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