RFR: 8348212: Need to add warn() step to JavacTaskImpl after JDK-8344148 [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Jan 24 16:58:47 UTC 2025


On Fri, 24 Jan 2025 16:23:15 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

>> In [JDK-8344148](https://bugs.openjdk.org/browse/JDK-8344148) a new `warn()` compiler phase was added and `JavaCompiler.java` was updated accordingly.
>> 
>> However, the class `JavacTaskImpl` also walks through the compiler phases step-by-step, but the new `warn()` step was never added there. This will cause some warnings to not be emitted when that API is used.
>> 
>> This PR adds the missing `warn()` calls.
>
> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add a regression test.

test/langtools/tools/javac/api/TestJavacTaskWithWarning.java line 45:

> 43: import javax.tools.ToolProvider;
> 44: 
> 45: public class TestJavacTaskWithWarning extends TestJavacTask {

We don't seem to have any other test doing this... what are you using of the super class?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23223#discussion_r1928980569


More information about the compiler-dev mailing list