RFR: 8338675: javac shouldn't silently change .jar files on the classpath [v7]

Joe Darcy darcy at openjdk.org
Mon Mar 31 21:02:13 UTC 2025


On Mon, 24 Mar 2025 09:49:09 GMT, David Beaumont <duke at openjdk.org> wrote:

>> Modifying `JavacFileManager` to skip creating sibling output class files for source files found in JARs.
>> 
>> This should match older (JDK 8) behavior whereby the JAR was not writable, and results in any newly generated class files being written to the current working directory (the output of class files into current directory isn't good, but it should match the old behavior).
>
> David Beaumont has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove unused import.

test/langtools/tools/javac/processing/filer/TestNoOverwriteJarFiles.java line 87:

> 85:  * <h2>Important</h2>
> 86:  *
> 87:  * This test creates files from Java compilation and annotation processing, and

I suppose some of the desired effect could be achieved using jtreg directives instead, but this approach seems fine too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23699#discussion_r2021757352


More information about the compiler-dev mailing list