RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v3]

Alan Bateman alanb at openjdk.java.net
Fri Jul 30 11:27:30 UTC 2021


On Fri, 30 Jul 2021 01:43:56 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> Lance Andersen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - Add Impl Note to Zip FS module-info
>>  - Merge
>>  - Add missing Copyright header and address minor comments
>>  - Address missing linefeed  after package name
>>  - Address overzelous intellij import update
>>  - Patch to address JDK-8251329
>
> src/jdk.zipfs/share/classes/module-info.java line 49:
> 
>> 47:  *
>> 48:  * @implNote The Zip File System will throw a ZipException when opening an
>> 49:  * existing Zip file that contains Zip entries with "." or ".." in its name elements.
> 
> Hello Lance, reading this sentence adds a bit of confusion since it uses the word "contains". Had I not known the implemenation details, this sentence would have made me think zip file with name elements of the form `foo.bar` or `hello..`  would also be rejected since these name elements "contain" `.` or `..`
> 
> Do you think we should change the word to something like "The Zip File System will throw a ZipException when opening an existing Zip file that has "." or ".." named entries"?

I think the `@implNote` tag can be dropped here. For the text then maybe it could be tweaked to something like "The ZIP file system provider does not support opening an existing ZIP that contains entries with ...".

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

PR: https://git.openjdk.java.net/jdk/pull/4900


More information about the core-libs-dev mailing list