9.6.4.5: Clarify that @SuppressWarnings requires unknown strings to be ignored

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 14
    • Affects Version/s: 13
    • Component/s: specification

      The API specification for java.lang.SuppressWarnings states:

      "The presence of unrecognized warning names is not an error: Compilers must ignore any warning names they do not recognize. They are, however, free to emit a warning if an annotation contains an unrecognized warning name."
      https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/SuppressWarnings.html#value()

      This requirement to ignore unknown strings is not included in JLS 9.6.4.5. @SuppressWarnings. The JLS and API spec should be consistent in the requirements on compilers in handling the annotation.

            Assignee:
            Alex Buckley
            Reporter:
            Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: