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

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

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 17
    • core-libs
    • None
    • behavioral
    • minimal
    • Java API
    • SE

      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.

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

              Created:
              Updated:
              Resolved: