RFR: 8356645: Javac should utilize new ZIP file system read-only access mode [v6]

Mikhail Yankelevich myankelevich at openjdk.org
Mon Jul 28 13:28:57 UTC 2025


On Mon, 28 Jul 2025 10:12:39 GMT, David Beaumont <duke at openjdk.org> wrote:

>> 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 incrementally with one additional commit since the last revision:
> 
>   Updating to latest local changes.

src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java line 25:

> 23:  * questions.
> 24:  */
> 25: 

Nit: could you please update copyright dates in all files

test/langtools/tools/javac/platform/VerifyCTSymClassFiles.java line 27:

> 25:  * @test
> 26:  * @bug 8331027
> 27:  * @summary Verify classfile inside ct.sym

Could you please add the bug id to the `@bug`, as this is a src change

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25639#discussion_r2236454628
PR Review Comment: https://git.openjdk.org/jdk/pull/25639#discussion_r2236462531


More information about the compiler-dev mailing list