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

Update java.lang.annotation.Target for changes in JLS 9.6.4.1

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 17
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Update text of java.lang.annotation.Target to match changes in JLS 9.6.4.1 (JDK-8261610).

      Problem

      The described semantics in JLS 9.6.4.1 and Target are out of sync.

      Solution

      Make the specs consistent by describing the absence of a Target annotation to mean "all declaration contexts."

      Specification

        * <p>If an {@code @Target} meta-annotation is not present on an annotation
        * interface {@code T}, then an annotation of type {@code T} may be written as
      - * a modifier for any declaration except a type parameter declaration.
      + * a modifier for any declaration.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
              Reviewed By:
              Alex Buckley, Joel Borggrén-Franck (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: