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

Jaikiran Pai jpai at openjdk.org
Sat Sep 28 14:14:35 UTC 2024


On Fri, 27 Sep 2024 01:41:33 GMT, Henry Jen <henryjen at openjdk.org> wrote:

>> This PR support a -k, --keep options like tar that allows jar to avoid override existing files.
>
> Henry Jen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address review feedbacks

test/jdk/tools/jar/ExtractFilesTest.java line 207:

> 205:         try {
> 206:             var p = Paths.get(".", path.split("/"));
> 207:             return String.join(nl, Files.readAllLines(p));

Do you think this could be simplified to `return Files.readString(p)`?

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

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


More information about the core-libs-dev mailing list