RFR: 8344079: Minor fixes and cleanups to compiler lint-related code [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Nov 29 18:49:39 UTC 2024


On Fri, 29 Nov 2024 16:31:26 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java line 1365:
>> 
>>> 1363: 
>>> 1364:             if (!incubatingModules.isEmpty()) {
>>> 1365:                 log.warning(LintCategory.INCUBATING, null, Warnings.IncubatingModules(incubatingModules));
>> 
>> Thanks for fixing all these. IMHO the fact we had so many bad usages points at the fact that the system we use to report warning is a bit too loose. I wonder if we should differentiate warning keys from lint warning keys, and have lint warnings be reported with a dedicated method in `Log`, so that there can be no confusion as to which is which (this is for a separate, possible, future PR)
>
> Agree... one of the best ways to ensure a policy is correctly followed is to make the build fail when it's not :)

Filed:

https://bugs.openjdk.org/browse/JDK-8345263

I will take a look.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22056#discussion_r1863853834


More information about the compiler-dev mailing list