-
Sub-task
-
Resolution: Fixed
-
P4
-
25
-
jdk-25+9-73-gba28119642a
-
master
-
generic
-
generic
This is split off as a sub-task of JDK-8224228, which seeks to add @SuppressWarnings support for lexical features.
Lint warnings that are subject to suppression via @SuppressWarnings must be deferred until attribution, because until then we can't determine whether they are suppressed or not.
Whether a lint warning is subject to suppression via @SuppressWarnings is a function of the associated LintCategory, not the warning itself. For example LintCategory.OPTIONS does not, and so an occurrence of @SuppressWarnings("options") is meaningless and would be ignored.
The status of the LintCategory is needed to determine deferral status of warnings in the upcoming refactoring. We can facilitate that very simply by adding a boolean property to the LintCategory enum which indicates whether that category supports @SuppressWarnings.
In addition, this permits a small optimization to be added to Lint.suppressionsFrom().
Lint warnings that are subject to suppression via @SuppressWarnings must be deferred until attribution, because until then we can't determine whether they are suppressed or not.
Whether a lint warning is subject to suppression via @SuppressWarnings is a function of the associated LintCategory, not the warning itself. For example LintCategory.OPTIONS does not, and so an occurrence of @SuppressWarnings("options") is meaningless and would be ignored.
The status of the LintCategory is needed to determine deferral status of warnings in the upcoming refactoring. We can facilitate that very simply by adding a boolean property to the LintCategory enum which indicates whether that category supports @SuppressWarnings.
In addition, this permits a small optimization to be added to Lint.suppressionsFrom().
- links to
-
Commit(master) openjdk/jdk/799e5b33
-
Review(master) openjdk/jdk/24529