-
Enhancement
-
Resolution: Fixed
-
P5
-
None
-
b05
-
generic
-
generic
During some other work several opportunities for minor lint-related fixes and cleanup were observed:
* Several lint warnings invoke Log.warning() without passing any LintCategory parameter. This obscures the connection between the warning and the lint category.
* The code lint.augment() can be simplified, obviating the need for a TreeScanner. This code can also be moved to a separate source file.
* A convenience method LintCategory.newEmptySet() would be useful.
* Some lint options are referred to by String literal name. These can instead be written as LintCategory.FOO.option to eliminate the possibility of the code getting out-of-sync. Since LintCategory is a straightforward enum class, class initialization ordering shouldn't be an issue.
* Several lint warnings invoke Log.warning() without passing any LintCategory parameter. This obscures the connection between the warning and the lint category.
* The code lint.augment() can be simplified, obviating the need for a TreeScanner. This code can also be moved to a separate source file.
* A convenience method LintCategory.newEmptySet() would be useful.
* Some lint options are referred to by String literal name. These can instead be written as LintCategory.FOO.option to eliminate the possibility of the code getting out-of-sync. Since LintCategory is a straightforward enum class, class initialization ordering shouldn't be an issue.
- links to
-
Commit(master) openjdk/jdk/dd81f8dc
-
Review(master) openjdk/jdk/22056