RFR: 8344159: Add lint warnings for unnecessary warning suppression

Pavel Rappo prappo at openjdk.org
Tue Sep 23 22:28:37 UTC 2025


On Tue, 23 Sep 2025 21:49:49 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

> Oops! Now you get a `"suppression"` warning in JDK N.

Thanks for this explanation. I can now see what you mean in the _Different Compiler Versions_ section of the CSR. That's some quality reasoning and future-proofing.

I suppose, it would unnecessarily complicate the design if we stipulate that `@SuppressWarnings("suppression")` should only emit a warning if there are no `@SuppressWarning` in any of the _child scopes_. Note, not just ineffective `@SuppressWarning`s, but none at all.

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

PR Comment: https://git.openjdk.org/jdk/pull/25167#issuecomment-3325741752


More information about the serviceability-dev mailing list