RFR: 8350880: (zipfs) Add support for read-only zip file systems [v13]

David Beaumont duke at openjdk.org
Tue May 27 09:28:19 UTC 2025


> Adding read-only support to ZipFileSystem.
> 
> The new `accessMode` environment property allows for readOnly and readWrite values, and ensures that the requested mode is consistent with what's returned.
> 
> This involved a little refactoring to ensure that "read only" state was set initially and only unset at the end of initialization if appropriate.
> 
> By making 2 methods return values (rather than silently set non-final fields as a side effect) it's now clear in what order fields are initialized and which are final (sadly there are still non-final fields, but only a split of this class into two types can fix that, since determining multi-jar support requires reading the file system).

David Beaumont 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 13 additional commits since the last revision:

 - Merge updates from master
 - More tweaking...
 - Tweaking exact wording.
 - Tweaking exact wording.
 - Don't use JUnit utils in TestNg.
 - Changes based on feedback
 - Changes based on feedback
 - Fixed test.
 - Changes based on review feedback.
 - Changes based on review feedback.
 - ... and 3 more: https://git.openjdk.org/jdk/compare/9c8b2f42...593c3a9b

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25178/files
  - new: https://git.openjdk.org/jdk/pull/25178/files/92355287..593c3a9b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25178&range=12
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25178&range=11-12

  Stats: 112295 lines in 2398 files changed: 65646 ins; 32848 del; 13801 mod
  Patch: https://git.openjdk.org/jdk/pull/25178.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25178/head:pull/25178

PR: https://git.openjdk.org/jdk/pull/25178


More information about the nio-dev mailing list