RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]
David Beaumont
duke at openjdk.org
Mon May 19 11:45:55 UTC 2025
On Fri, 16 May 2025 15:19:26 GMT, Lance Andersen <lancea at openjdk.org> wrote:
>> src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 230:
>>
>>> 228: // It requires 'entryLookup' and 'readOnly' to have safe defaults (which
>>> 229: // is why they are the only non-final fields), and it requires that the
>>> 230: // inode map has been initialized.
>>
>> It's good to note that `determineReleaseVersion(...)` (and `createVersionedLinks(...)`) access instance fields of the `ZipFileSystem` being constructed. I think the comment however could be brief and should leave out the details about safe defaults.
>>
>> Perhaps something like:
>>
>>> determineReleaseVersion() and createVersionedLinks() access instance fields while 'this' ZipFileSystem instance is being constructed.
>
> Not sure I see a need for the last sentence regarding the inode map having to be initialized in addition to Jai's comments above
Fair enough, removed. I err on the side of over explaining things for future maintainers.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25178#discussion_r2095518822
More information about the core-libs-dev
mailing list