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

Specs for meta-annotation-types missing enum class qualification

XMLWordPrintable

    • b58
    • generic
    • generic

      In earlier pre-releases of annotations, target-typing was in effect for enum-valued annotation members. Some of our specifications still reflect that. Some code examples in the specs won't compile. The following changes should be made:

      java.lang.annotation.Retention:

      "the retention policy defaults to CLASS" -> "the retention policy defaults to RetentionPolicy.CLASS"

      java.lang.annotation.Target:

      "@Target(ANNOTATION_TYPE)" -> "@Target(ElementType.ANNOTATION_TYPE)"
      "@Target({FIELD, METHOD, FIELD})" ->
      "@Target({ElementType.FIELD, ElementType.METHOD, ElementType.FIELD})"

            darcy Joe Darcy
            jjb Josh Bloch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: