RFR: 8356645: Javac should utilize new ZIP file system read-only access mode [v5]
David Beaumont
duke at openjdk.org
Mon Jul 28 10:07:44 UTC 2025
> This PR seeks to integrate the new ZipFileSystem "accessMode" parameter to open internal ZIP/JAR files as read only, to act as defense in-depth against accidental modification.
>
> Note that this currently also propagates the (currently undocumented) "zipinfo-time" parameter to several other places where ZIP/JAR files are opened, which is likely to improve performance. This was discussed and is expected to be safe (but it's something to be careful about).
> This will, of course, be thoroughly tested before integration.
>
> It also unifies several places to use a common helper method to obtain the environment map, adds more comments, and changes a small number of affected tests.
>
> I'm also happy to update the original bug description to include the timestamp related changes as necessary.
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 four additional commits since the last revision:
- Merge updates from master
- Reverted test (not caused by this PR).
- Some (not all) feedback addressed. Still open questions.
- Applying read-only configuration for Javac internal use of ZIP/JAR file systems.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25639/files
- new: https://git.openjdk.org/jdk/pull/25639/files/ab5e98da..217cdda6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25639&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25639&range=03-04
Stats: 54127 lines in 1365 files changed: 34963 ins; 12776 del; 6388 mod
Patch: https://git.openjdk.org/jdk/pull/25639.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25639/head:pull/25639
PR: https://git.openjdk.org/jdk/pull/25639
More information about the compiler-dev
mailing list