> This PR adds a new compiler warning for `@SuppressWarnings` annotations that 
> don't actually suppress any warnings.
> 
> Summary of code changes:
> 
> * Add new warning and associated lint category `"suppression"`
> * Update `LintMapper` to keep track of which `@SuppressWarnings` suppressions 
> have been validated ¹
> * Update `Log.warning()` so it validates any current suppression of the 
> warning's lint category in effect.
> * Add a new `validate` parameter to `Lint.isEnabled()` and 
> `Lint.isSuppressed()` that specifies whether to also validate any current 
> suppression.
> * Add `Lint.isActive()` to check whether a category is enabled _or_ 
> suppression of the category is being tracked - in other words, whether the 
> warning calculation needs to be performed. Used for non-trivial warning 
> calculations.
> * Add `-Xlint:-suppression` flags to `*.gmk` build files so the build doesn't 
> break
> 
> ¹ The suppression of a lint category is "validated" as soon as it suppresses 
> some warning in that category
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Archie Cobbs has updated the pull request incrementally with one additional 
commit since the last revision:

  Add @INNER@ placeholder for TEXT_BLOCKS test case & clean up a few others.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25167/files
  - new: https://git.openjdk.org/jdk/pull/25167/files/e16ef3bc..3877adc3

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25167&range=11
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25167&range=10-11

  Stats: 18 lines in 1 file changed: 4 ins; 8 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/25167.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25167/head:pull/25167

PR: https://git.openjdk.org/jdk/pull/25167

Reply via email to