# HG changeset patch # User darcy # Date 1387558792 28800 # Node ID 18a23ba7dd3805247d196e1644594f9523c3c37c # Parent 5f22afc7db58bba26bf5330b364a5a69fb6e708a 8023471: Add compatibility note to AnnotatedElement Reviewed-by: smarks, jfranck, abuckley diff -r 5f22afc7db58 -r 18a23ba7dd38 jdk/src/share/classes/java/lang/annotation/Annotation.java --- a/jdk/src/share/classes/java/lang/annotation/Annotation.java Fri Dec 20 14:53:38 2013 +0100 +++ b/jdk/src/share/classes/java/lang/annotation/Annotation.java Fri Dec 20 08:59:52 2013 -0800 @@ -34,6 +34,10 @@ * More information about annotation types can be found in section 9.6 of * The Java™ Language Specification. * + * The {@link java.lang.reflect.AnnotatedElement} interface discusses + * compatibility concerns when evolving an annotation type from being + * non-repeatable to being repeatable. + * * @author Josh Bloch * @since 1.5 */ diff -r 5f22afc7db58 -r 18a23ba7dd38 jdk/src/share/classes/java/lang/reflect/AnnotatedElement.java --- a/jdk/src/share/classes/java/lang/reflect/AnnotatedElement.java Fri Dec 20 14:53:38 2013 +0100 +++ b/jdk/src/share/classes/java/lang/reflect/AnnotatedElement.java Fri Dec 20 08:59:52 2013 -0800 @@ -135,7 +135,77 @@ * annotations on E are directly present on E in place * of their container annotation, in the order in which they appear in * the value element of the container annotation. - + * + *

There are several compatibility concerns to keep in mind if an + * annotation type T is originally not repeatable and + * later modified to be repeatable. + * + * The containing annotation type for T is TC. + * + *

+ * *

If an annotation returned by a method in this interface contains * (directly or indirectly) a {@link Class}-valued member referring to * a class that is not accessible in this VM, attempting to read the class