Integrated: 8350880: (zipfs) Add support for read-only zip file systems

David Beaumont duke at openjdk.org
Tue Jun 3 04:04:00 UTC 2025


On Mon, 12 May 2025 09:40:56 GMT, David Beaumont <duke at openjdk.org> wrote:

> 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).

This pull request has now been integrated.

Changeset: 832c5b06
Author:    David Beaumont <david.beaumont at oracle.com>
Committer: Jaikiran Pai <jpai at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/832c5b06e8f278d70398e07d32d63d094a06967c
Stats:     396 lines in 5 files changed: 328 ins; 33 del; 35 mod

8350880: (zipfs) Add support for read-only zip file systems

Reviewed-by: lancea, alanb, jpai

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

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


More information about the nio-dev mailing list