Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8344079

Minor fixes and cleanups to compiler lint-related code

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 25
    • None
    • tools
    • 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.

            acobbs Archie Cobbs
            acobbs Archie Cobbs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: