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})"
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})"