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

Martin Balao mbalao at openjdk.org
Wed Dec 4 02:12:45 UTC 2024


On Tue, 26 Nov 2024 23:41:59 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:

> Not clean backport from JDK11 patch:
> - No GNUStyle options in JDK8
> - No support for long options
> - Tests updated to use JDK8 API
> - Removed subtest for long option
> 
> JTREG tests passed

Thanks for this contribution.

One minor comment regarding the text "-k/k" in the warning message.  Passing the argument as a standalone "-k" seems to work only with GNUStyleOptions. We can pass "-k..." (along with other options), but the most typical invocation would be "-xk...". I'm okay with the suggested "-k/k" text but would have been okay with with "k" too.

I have the impression that the addition of "main.help.opt.extract.keep-old-files" is related to GNUStyleOptions. The place where "-k  Do not overwrite existing files" was added is not the exact equivalent, but we should be able to live with that.  Just wonder if we should add "k" to "[vfmn0PMe]". What do you think?

The test "testGnuOptionsKeptOldFile" does not apply, does it? The leading "-" is optional for the non-Gnu interface.

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

PR Review: https://git.openjdk.org/jdk8u-dev/pull/608#pullrequestreview-2477125092


More information about the jdk8u-dev mailing list