• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • tools
    • 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.

      In JDK 9 and later, there is a special exception to the normal rules for deprecation and preview warnings, which is that these warnings are automatically suppressed for import statements. This is because an import statement is just a lexical shortcut, not an actual use of the symbol.

      The current code in Check.java implements this by manipulating the current Lint instance directly, but this operation is incompatible upcoming changes to deferred lint handling. Instead, there can be an explicit flag for "import warning suppression" in Check.java to handle this. This will also make the code a bit clearer.

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

              Created:
              Updated:
              Resolved: