8006119: update javac to follow latest spec for repeatable annotations
authorjjg
Mon, 14 Jan 2013 13:50:01 -0800
changeset 15356 cf312dc54c60
parent 15355 a4757c33cae9
child 15357 61fec7e4133f
8006119: update javac to follow latest spec for repeatable annotations Reviewed-by: darcy
langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java
langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java
langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContaineeSynthDoc.java
langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerSynthDoc.java
langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContaineeSynthDoc.java
langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerSynthNotDoc.java
langtools/test/tools/javac/annotations/repeatingAnnotations/BaseAnnoAsContainerAnno.java
langtools/test/tools/javac/annotations/repeatingAnnotations/BaseAnnoAsContainerAnno.out
langtools/test/tools/javac/annotations/repeatingAnnotations/BasicRepeatingAnnotations.java
langtools/test/tools/javac/annotations/repeatingAnnotations/CheckTargets.java
langtools/test/tools/javac/annotations/repeatingAnnotations/ClassReaderDefault.java
langtools/test/tools/javac/annotations/repeatingAnnotations/ContainerHasRepeatedContained.java
langtools/test/tools/javac/annotations/repeatingAnnotations/CyclicAnnotation.java
langtools/test/tools/javac/annotations/repeatingAnnotations/CyclicAnnotation.out
langtools/test/tools/javac/annotations/repeatingAnnotations/DefaultCasePresent.java
langtools/test/tools/javac/annotations/repeatingAnnotations/DelayRepeatedContainer.java
langtools/test/tools/javac/annotations/repeatingAnnotations/DocumentedContainerAnno.java
langtools/test/tools/javac/annotations/repeatingAnnotations/DocumentedContainerAnno.out
langtools/test/tools/javac/annotations/repeatingAnnotations/InheritedContainerAnno.java
langtools/test/tools/javac/annotations/repeatingAnnotations/InheritedContainerAnno.out
langtools/test/tools/javac/annotations/repeatingAnnotations/InvalidTarget.java
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainedBy.java
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainer.java
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainer.out
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainerFor.java
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.java
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.out
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.java
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.out
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.java
langtools/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.out
langtools/test/tools/javac/annotations/repeatingAnnotations/MultiLevelRepeatableAnno.java
langtools/test/tools/javac/annotations/repeatingAnnotations/MultipleAnnoMixedOrder.java
langtools/test/tools/javac/annotations/repeatingAnnotations/NestedContainers.java
langtools/test/tools/javac/annotations/repeatingAnnotations/NoRepeatableAnno.out
langtools/test/tools/javac/annotations/repeatingAnnotations/RepMemberAnno.java
langtools/test/tools/javac/annotations/repeatingAnnotations/RepSelfMemberAnno.java
langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingAndContainerPresent.java
langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingTargetNotAllowed.java
langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingTargetNotAllowed.out
langtools/test/tools/javac/annotations/repeatingAnnotations/SelfRepeatingAnnotations.java
langtools/test/tools/javac/annotations/repeatingAnnotations/SingleRepeatingAndContainer.java
langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongContainedBy.java
langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongContainerFor.java
langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongRepeatable.java
langtools/test/tools/javac/annotations/repeatingAnnotations/WrongContainedBy.java
langtools/test/tools/javac/annotations/repeatingAnnotations/WrongContainerFor.java
langtools/test/tools/javac/annotations/repeatingAnnotations/WrongReturnTypeForValue.java
langtools/test/tools/javac/annotations/repeatingAnnotations/WrongReturnTypeForValue.out
langtools/test/tools/javac/annotations/repeatingAnnotations/combo/BasicSyntaxCombo.java
langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DeprecatedAnnoCombo.java
langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DocumentedAnnoCombo.java
langtools/test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java
langtools/test/tools/javac/annotations/repeatingAnnotations/combo/InheritedAnnoCombo.java
langtools/test/tools/javac/annotations/repeatingAnnotations/combo/RetentionAnnoCombo.java
langtools/test/tools/javac/diags/examples.not-yet.txt
langtools/test/tools/javac/diags/examples/ContainedByDocumentedMismatch.java
langtools/test/tools/javac/diags/examples/ContainedByInheritedMismatch.java
langtools/test/tools/javac/diags/examples/ContainedByNoValue.java
langtools/test/tools/javac/diags/examples/ContainedByNonDefault.java
langtools/test/tools/javac/diags/examples/ContainedByRetentionMismatch.java
langtools/test/tools/javac/diags/examples/ContainedByTargetMismatch.java
langtools/test/tools/javac/diags/examples/ContainedByWrongValueType.java
langtools/test/tools/javac/diags/examples/InvalidDuplicateAnnotation.java
langtools/test/tools/javac/diags/examples/RepeatableDocumentedMismatch.java
langtools/test/tools/javac/diags/examples/RepeatableInheritedMismatch.java
langtools/test/tools/javac/diags/examples/RepeatableNoValue.java
langtools/test/tools/javac/diags/examples/RepeatableNonDefault.java
langtools/test/tools/javac/diags/examples/RepeatableRetentionMismatch.java
langtools/test/tools/javac/diags/examples/RepeatableTargetMismatch.java
langtools/test/tools/javac/diags/examples/RepeatableWrongValueType.java
langtools/test/tools/javac/diags/examples/RepeatingAnnotationAndContainer.java
langtools/test/tools/javac/diags/examples/WrongContainedBy.java
langtools/test/tools/javac/diags/examples/WrongContainerFor.java
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -126,12 +126,12 @@
             //
             // We need to do this in two passes because when creating
             // a container for a repeating annotation we must
-            // guarantee that the @ContainedBy on the
+            // guarantee that the @Repeatable on the
             // contained annotation is fully annotated
             //
             // The way we force this order is to do all repeating
             // annotations in a pass after all non-repeating are
-            // finished. This will work because @ContainedBy
+            // finished. This will work because @Repeatable
             // is non-repeating and therefore will be annotated in the
             // fist pass.
 
@@ -261,7 +261,7 @@
             // its contained annotation.
             ListBuffer<Attribute.Compound> manualContainer = ctx.annotated.get(validRepeated.type.tsym);
             if (manualContainer != null) {
-                log.error(ctx.pos.get(manualContainer.first()), "invalid.containedby.annotation.repeated.and.container.present",
+                log.error(ctx.pos.get(manualContainer.first()), "invalid.repeatable.annotation.repeated.and.container.present",
                         manualContainer.first().type.tsym);
             }
         }
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -161,8 +161,7 @@
     public final Type autoCloseableType;
     public final Type trustMeType;
     public final Type lambdaMetafactory;
-    public final Type containedByType;
-    public final Type containerForType;
+    public final Type repeatableType;
     public final Type documentedType;
     public final Type elementTypeType;
 
@@ -494,8 +493,7 @@
         deprecatedType = enterClass("java.lang.Deprecated");
         suppressWarningsType = enterClass("java.lang.SuppressWarnings");
         inheritedType = enterClass("java.lang.annotation.Inherited");
-        containedByType = enterClass("java.lang.annotation.ContainedBy");
-        containerForType = enterClass("java.lang.annotation.ContainerFor");
+        repeatableType = enterClass("java.lang.annotation.Repeatable");
         documentedType = enterClass("java.lang.annotation.Documented");
         elementTypeType = enterClass("java.lang.annotation.ElementType");
         systemType = enterClass("java.lang.System");
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -392,7 +392,7 @@
                     List.of(p)));
 
             if (!chk.annotationApplicable(annoTree, on))
-                log.error(annoTree.pos(), "invalid.containedby.annotation.incompatible.target", targetContainerType, origAnnoType);
+                log.error(annoTree.pos(), "invalid.repeatable.annotation.incompatible.target", targetContainerType, origAnnoType);
 
             if (!chk.validateAnnotationDeferErrors(annoTree))
                 log.error(annoTree.pos(), "duplicate.annotation.invalid.repeated", origAnnoType);
@@ -414,11 +414,11 @@
         Type origAnnoType = currentAnno.type;
         TypeSymbol origAnnoDecl = origAnnoType.tsym;
 
-        // Fetch the ContainedBy annotation from the current
+        // Fetch the Repeatable annotation from the current
         // annotation's declaration, or null if it has none
-        Attribute.Compound ca = origAnnoDecl.attribute(syms.containedByType.tsym);
-        if (ca == null) { // has no ContainedBy annotation
-            log.error(pos, "duplicate.annotation.missing.container", origAnnoType, syms.containedByType);
+        Attribute.Compound ca = origAnnoDecl.attribute(syms.repeatableType.tsym);
+        if (ca == null) { // has no Repeatable annotation
+            log.error(pos, "duplicate.annotation.missing.container", origAnnoType, syms.repeatableType);
             return null;
         }
 
@@ -440,23 +440,23 @@
             DiagnosticPosition pos,
             TypeSymbol annoDecl)
     {
-        // The next three checks check that the ContainedBy annotation
+        // The next three checks check that the Repeatable annotation
         // on the declaration of the annotation type that is repeating is
         // valid.
 
-        // ContainedBy must have at least one element
+        // Repeatable must have at least one element
         if (ca.values.isEmpty()) {
-            log.error(pos, "invalid.containedby.annotation", annoDecl);
+            log.error(pos, "invalid.repeatable.annotation", annoDecl);
             return null;
         }
         Pair<MethodSymbol,Attribute> p = ca.values.head;
         Name name = p.fst.name;
         if (name != names.value) { // should contain only one element, named "value"
-            log.error(pos, "invalid.containedby.annotation", annoDecl);
+            log.error(pos, "invalid.repeatable.annotation", annoDecl);
             return null;
         }
         if (!(p.snd instanceof Attribute.Class)) { // check that the value of "value" is an Attribute.Class
-            log.error(pos, "invalid.containedby.annotation", annoDecl);
+            log.error(pos, "invalid.repeatable.annotation", annoDecl);
             return null;
         }
 
@@ -491,13 +491,13 @@
         }
         if (error) {
             log.error(pos,
-                      "invalid.containedby.annotation.multiple.values",
+                      "invalid.repeatable.annotation.multiple.values",
                       targetContainerType,
                       nr_value_elems);
             return null;
         } else if (nr_value_elems == 0) {
             log.error(pos,
-                      "invalid.containedby.annotation.no.value",
+                      "invalid.repeatable.annotation.no.value",
                       targetContainerType);
             return null;
         }
@@ -506,7 +506,7 @@
         // probably "impossible" to fail this
         if (containerValueSymbol.kind != Kinds.MTH) {
             log.error(pos,
-                      "invalid.containedby.annotation.invalid.value",
+                      "invalid.repeatable.annotation.invalid.value",
                       targetContainerType);
             fatalError = true;
         }
@@ -518,7 +518,7 @@
         if (!(types.isArray(valueRetType) &&
               types.isSameType(expectedType, valueRetType))) {
             log.error(pos,
-                      "invalid.containedby.annotation.value.return",
+                      "invalid.repeatable.annotation.value.return",
                       targetContainerType,
                       valueRetType,
                       expectedType);
@@ -528,10 +528,7 @@
             fatalError = true;
         }
 
-        // Explicitly no check for/validity of @ContainerFor. That is
-        // done on declaration of the container, and at reflect time.
-
-        // The rest of the conditions for a valid containing annotation are made
+        // The conditions for a valid containing annotation are made
         // in Check.validateRepeatedAnnotaton();
 
         return fatalError ? null : containerValueSymbol;
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3844,24 +3844,14 @@
                 log.error(tree.typarams.head.pos(),
                           "intf.annotation.cant.have.type.params");
 
-            // If this annotation has a @ContainedBy, validate
-            Attribute.Compound containedBy = c.attribute(syms.containedByType.tsym);
-            if (containedBy != null) {
-                // get diagnositc position for error reporting
-                DiagnosticPosition cbPos = getDiagnosticPosition(tree, containedBy.type);
+            // If this annotation has a @Repeatable, validate
+            Attribute.Compound repeatable = c.attribute(syms.repeatableType.tsym);
+            if (repeatable != null) {
+                // get diagnostic position for error reporting
+                DiagnosticPosition cbPos = getDiagnosticPosition(tree, repeatable.type);
                 Assert.checkNonNull(cbPos);
 
-                chk.validateContainedBy(c, containedBy, cbPos);
-            }
-
-            // If this annotation has a @ContainerFor, validate
-            Attribute.Compound containerFor = c.attribute(syms.containerForType.tsym);
-            if (containerFor != null) {
-                // get diagnositc position for error reporting
-                DiagnosticPosition cfPos = getDiagnosticPosition(tree, containerFor.type);
-                Assert.checkNonNull(cfPos);
-
-                chk.validateContainerFor(c, containerFor, cfPos);
+                chk.validateRepeatable(c, repeatable, cbPos);
             }
         } else {
             // Check that all extended classes and interfaces
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2592,30 +2592,30 @@
     }
 
     /**
-     * Validate the proposed container 'containedBy' on the
+     * Validate the proposed container 'repeatable' on the
      * annotation type symbol 's'. Report errors at position
      * 'pos'.
      *
-     * @param s The (annotation)type declaration annotated with a @ContainedBy
-     * @param containedBy the @ContainedBy on 's'
+     * @param s The (annotation)type declaration annotated with a @Repeatable
+     * @param repeatable the @Repeatable on 's'
      * @param pos where to report errors
      */
-    public void validateContainedBy(TypeSymbol s, Attribute.Compound containedBy, DiagnosticPosition pos) {
-        Assert.check(types.isSameType(containedBy.type, syms.containedByType));
+    public void validateRepeatable(TypeSymbol s, Attribute.Compound repeatable, DiagnosticPosition pos) {
+        Assert.check(types.isSameType(repeatable.type, syms.repeatableType));
 
         Type t = null;
-        List<Pair<MethodSymbol,Attribute>> l = containedBy.values;
+        List<Pair<MethodSymbol,Attribute>> l = repeatable.values;
         if (!l.isEmpty()) {
             Assert.check(l.head.fst.name == names.value);
             t = ((Attribute.Class)l.head.snd).getValue();
         }
 
         if (t == null) {
-            log.error(pos, "invalid.container.wrong.containedby", s, containedBy);
+            // errors should already have been reported during Annotate
             return;
         }
 
-        validateHasContainerFor(t.tsym, s, pos);
+        validateValue(t.tsym, s, pos);
         validateRetention(t.tsym, s, pos);
         validateDocumented(t.tsym, s, pos);
         validateInherited(t.tsym, s, pos);
@@ -2623,79 +2623,18 @@
         validateDefault(t.tsym, s, pos);
     }
 
-    /**
-     * Validate the proposed container 'containerFor' on the
-     * annotation type symbol 's'. Report errors at position
-     * 'pos'.
-     *
-     * @param s The (annotation)type declaration annotated with a @ContainerFor
-     * @param containerFor the @ContainedFor on 's'
-     * @param pos where to report errors
-     */
-    public void validateContainerFor(TypeSymbol s, Attribute.Compound containerFor, DiagnosticPosition pos) {
-        Assert.check(types.isSameType(containerFor.type, syms.containerForType));
-
-        Type t = null;
-        List<Pair<MethodSymbol,Attribute>> l = containerFor.values;
-        if (!l.isEmpty()) {
-            Assert.check(l.head.fst.name == names.value);
-            t = ((Attribute.Class)l.head.snd).getValue();
-        }
-
-        if (t == null) {
-            log.error(pos, "invalid.container.wrong.containerfor", s, containerFor);
-            return;
-        }
-
-        validateHasContainedBy(t.tsym, s, pos);
-    }
-
-    private void validateHasContainedBy(TypeSymbol container, TypeSymbol contained, DiagnosticPosition pos) {
-        Attribute.Compound containedBy = container.attribute(syms.containedByType.tsym);
-
-        if (containedBy == null) {
-            log.error(pos, "invalid.container.no.containedby", container, syms.containedByType.tsym);
-            return;
+    private void validateValue(TypeSymbol container, TypeSymbol contained, DiagnosticPosition pos) {
+        Scope.Entry e = container.members().lookup(names.value);
+        if (e.scope != null && e.sym.kind == MTH) {
+            MethodSymbol m = (MethodSymbol) e.sym;
+            Type ret = m.getReturnType();
+            if (!(ret.hasTag(ARRAY) && types.isSameType(((ArrayType)ret).elemtype, contained.type))) {
+                log.error(pos, "invalid.repeatable.annotation.value.return",
+                        container, ret, types.makeArrayType(contained.type));
+            }
+        } else {
+            log.error(pos, "invalid.repeatable.annotation.no.value", container);
         }
-
-        Type t = null;
-        List<Pair<MethodSymbol,Attribute>> l = containedBy.values;
-        if (!l.isEmpty()) {
-            Assert.check(l.head.fst.name == names.value);
-            t = ((Attribute.Class)l.head.snd).getValue();
-        }
-
-        if (t == null) {
-            log.error(pos, "invalid.container.wrong.containedby", container, contained);
-            return;
-        }
-
-        if (!types.isSameType(t, contained.type))
-            log.error(pos, "invalid.container.wrong.containedby", t.tsym, contained);
-    }
-
-    private void validateHasContainerFor(TypeSymbol container, TypeSymbol contained, DiagnosticPosition pos) {
-        Attribute.Compound containerFor = container.attribute(syms.containerForType.tsym);
-
-        if (containerFor == null) {
-            log.error(pos, "invalid.container.no.containerfor", container, syms.containerForType.tsym);
-            return;
-        }
-
-        Type t = null;
-        List<Pair<MethodSymbol,Attribute>> l = containerFor.values;
-        if (!l.isEmpty()) {
-            Assert.check(l.head.fst.name == names.value);
-            t = ((Attribute.Class)l.head.snd).getValue();
-        }
-
-        if (t == null) {
-            log.error(pos, "invalid.container.wrong.containerfor", container, contained);
-            return;
-        }
-
-        if (!types.isSameType(t, contained.type))
-            log.error(pos, "invalid.container.wrong.containerfor", t.tsym, contained);
     }
 
     private void validateRetention(Symbol container, Symbol contained, DiagnosticPosition pos) {
@@ -2715,7 +2654,7 @@
             }
         }
         if (error ) {
-            log.error(pos, "invalid.containedby.annotation.retention",
+            log.error(pos, "invalid.repeatable.annotation.retention",
                       container, containerRetention,
                       contained, containedRetention);
         }
@@ -2724,7 +2663,7 @@
     private void validateDocumented(Symbol container, Symbol contained, DiagnosticPosition pos) {
         if (contained.attribute(syms.documentedType.tsym) != null) {
             if (container.attribute(syms.documentedType.tsym) == null) {
-                log.error(pos, "invalid.containedby.annotation.not.documented", container, contained);
+                log.error(pos, "invalid.repeatable.annotation.not.documented", container, contained);
             }
         }
     }
@@ -2732,7 +2671,7 @@
     private void validateInherited(Symbol container, Symbol contained, DiagnosticPosition pos) {
         if (contained.attribute(syms.inheritedType.tsym) != null) {
             if (container.attribute(syms.inheritedType.tsym) == null) {
-                log.error(pos, "invalid.containedby.annotation.not.inherited", container, contained);
+                log.error(pos, "invalid.repeatable.annotation.not.inherited", container, contained);
             }
         }
     }
@@ -2752,7 +2691,7 @@
         // contained has target, but container has not, error
         Attribute.Array containerTarget = getAttributeTargetAttribute(container);
         if (containerTarget == null) {
-            log.error(pos, "invalid.containedby.annotation.incompatible.target", container, contained);
+            log.error(pos, "invalid.repeatable.annotation.incompatible.target", container, contained);
             return;
         }
 
@@ -2775,7 +2714,7 @@
         }
 
         if (!isTargetSubset(containedTargets, containerTargets)) {
-            log.error(pos, "invalid.containedby.annotation.incompatible.target", container, contained);
+            log.error(pos, "invalid.repeatable.annotation.incompatible.target", container, contained);
         }
     }
 
@@ -2809,7 +2748,7 @@
                 elm.kind == Kinds.MTH &&
                 ((MethodSymbol)elm).defaultValue == null) {
                 log.error(pos,
-                          "invalid.containedby.annotation.elem.nondefault",
+                          "invalid.repeatable.annotation.elem.nondefault",
                           container,
                           elm);
             }
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java	Mon Jan 14 13:50:01 2013 -0800
@@ -261,13 +261,13 @@
     }
 
     // Needed to unpack the runtime view of containing annotations
-    private static final Class<? extends Annotation> CONTAINED_BY_CLASS = initContainedBy();
+    private static final Class<? extends Annotation> REPEATABLE_CLASS = initRepeatable();
     private static final Method VALUE_ELEMENT_METHOD = initValueElementMethod();
 
-    private static Class<? extends Annotation> initContainedBy() {
+    private static Class<? extends Annotation> initRepeatable() {
         try {
-            @SuppressWarnings("unchecked") // java.lang.annotation.ContainedBy extends Annotation by being an annotation type
-            Class<? extends Annotation> c = (Class)Class.forName("java.lang.annotation.ContainedBy");
+            @SuppressWarnings("unchecked") // java.lang.annotation.Repeatable extends Annotation by being an annotation type
+            Class<? extends Annotation> c = (Class)Class.forName("java.lang.annotation.Repeatable");
             return c;
         } catch (ClassNotFoundException e) {
             return null;
@@ -276,12 +276,12 @@
         }
     }
     private static Method initValueElementMethod() {
-        if (CONTAINED_BY_CLASS == null)
+        if (REPEATABLE_CLASS == null)
             return null;
 
         Method m = null;
         try {
-            m = CONTAINED_BY_CLASS.getMethod("value");
+            m = REPEATABLE_CLASS.getMethod("value");
             if (m != null)
                 m.setAccessible(true);
             return m;
@@ -292,19 +292,19 @@
 
     // Helper to getAnnotations
     private static Class<? extends Annotation> getContainer(Class<? extends Annotation> annoType) {
-        // Since we can not refer to java.lang.annotation.ContainedBy until we are
-        // bootstrapping with java 8 we need to get the ContainedBy annotation using
+        // Since we can not refer to java.lang.annotation.Repeatable until we are
+        // bootstrapping with java 8 we need to get the Repeatable annotation using
         // reflective invocations instead of just using its type and element method.
-        if (CONTAINED_BY_CLASS != null &&
+        if (REPEATABLE_CLASS != null &&
             VALUE_ELEMENT_METHOD != null) {
-            // Get the ContainedBy instance on the annotations declaration
-            Annotation containedBy = (Annotation)annoType.getAnnotation(CONTAINED_BY_CLASS);
-            if (containedBy != null) {
+            // Get the Repeatable instance on the annotations declaration
+            Annotation repeatable = (Annotation)annoType.getAnnotation(REPEATABLE_CLASS);
+            if (repeatable != null) {
                 try {
                     // Get the value element, it should be a class
                     // indicating the containing annotation type
                     @SuppressWarnings("unchecked")
-                    Class<? extends Annotation> containerType = (Class)VALUE_ELEMENT_METHOD.invoke(containedBy);
+                    Class<? extends Annotation> containerType = (Class)VALUE_ELEMENT_METHOD.invoke(repeatable);
                     if (containerType == null)
                         return null;
 
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -319,64 +319,48 @@
 compiler.err.duplicate.annotation.missing.container=\
     duplicate annotation, the declaration of {0} does not have a valid {1} annotation
 
-# 0: type, 1: type
-compiler.err.invalid.container.no.containedby=\
-    invalid contained repeatable annotation, {0} is not annotated with {1}
-
-# 0: type, 1: type
-compiler.err.invalid.container.wrong.containedby=\
-    invalid contained repeatable annotation, {0} does not match {1}
-
-# 0: type, 1: type
-compiler.err.invalid.container.no.containerfor=\
-    invalid container for repeating annotations, {0} is not annotated with {1}
-
-# 0: type, 1: type
-compiler.err.invalid.container.wrong.containerfor=\
-    invalid container for repeating annotations, {0} does not match {1}
+# 0: type
+compiler.err.invalid.repeatable.annotation=\
+    duplicate annotation, {0} is annotated with an invalid Repeatable annotation
 
 # 0: type
-compiler.err.invalid.containedby.annotation=\
-    duplicate annotation, {0} is annotated with an invalid ContainedBy annotation
-
-# 0: type
-compiler.err.invalid.containedby.annotation.no.value=\
-    duplicate annotation, {0} is not a valid ContainedBy, no value element method declared
+compiler.err.invalid.repeatable.annotation.no.value=\
+    duplicate annotation, {0} is not a valid Repeatable, no value element method declared
 
 # 0: type, 1: number
-compiler.err.invalid.containedby.annotation.multiple.values=\
-    duplicate annotation, {0} is not a valid ContainedBy, {1} value element methods declared
+compiler.err.invalid.repeatable.annotation.multiple.values=\
+    duplicate annotation, {0} is not a valid Repeatable, {1} value element methods declared
 
 # 0: type
-compiler.err.invalid.containedby.annotation.invalid.value=\
-    duplicate annotation, {0} is not a valid ContainedBy, invalid value element, need a method
+compiler.err.invalid.repeatable.annotation.invalid.value=\
+    duplicate annotation, {0} is not a valid Repeatable, invalid value element, need a method
 
 # 0: type, 1: type, 2: type
-compiler.err.invalid.containedby.annotation.value.return=\
+compiler.err.invalid.repeatable.annotation.value.return=\
     duplicate annotation, value element of containing annotation {0} should have type {2}, found {1}
 
 # 0: type, 1: symbol
-compiler.err.invalid.containedby.annotation.elem.nondefault=\
+compiler.err.invalid.repeatable.annotation.elem.nondefault=\
     containing annotation {0} does not have a default value for element {1}
 
 # 0: symbol, 1: type, 2: symbol, 3: type
-compiler.err.invalid.containedby.annotation.retention=\
+compiler.err.invalid.repeatable.annotation.retention=\
     containing annotation {0} has shorter retention ({1}) than the contained annotation {2} with retention {3}
 
 # 0: symbol, 1: symbol
-compiler.err.invalid.containedby.annotation.not.documented=\
+compiler.err.invalid.repeatable.annotation.not.documented=\
     containing annotation type, {0}, is not @Documented while repeated annotation type, {1}, is
 
 # 0: symbol, 1: symbol
-compiler.err.invalid.containedby.annotation.not.inherited=\
+compiler.err.invalid.repeatable.annotation.not.inherited=\
     containing annotation type, {0}, is not @Inherited while repeated annotation type, {1}, is
 
 # 0: symbol, 1: symbol
-compiler.err.invalid.containedby.annotation.incompatible.target=\
+compiler.err.invalid.repeatable.annotation.incompatible.target=\
     target of container annotation {0} is not a subset of target of repeated annotation {1}
 
 # 0: symbol
-compiler.err.invalid.containedby.annotation.repeated.and.container.present=\
+compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\
     container {0} must not be present at the same time as the element it contains
 
 # 0: name
--- a/langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContaineeSynthDoc.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContaineeSynthDoc.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,6 @@
  * @author Bhavesh Patel
  */
 @Documented
-@ContainedBy(ContainerSynthDoc.class)
+@Repeatable(ContainerSynthDoc.class)
 public @interface ContaineeSynthDoc {
 }
--- a/langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerSynthDoc.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg/ContainerSynthDoc.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,6 @@
  * @author Bhavesh Patel
  */
 @Documented
-@ContainerFor(ContaineeSynthDoc.class)
 public @interface ContainerSynthDoc {
 
     ContaineeSynthDoc[] value();
--- a/langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContaineeSynthDoc.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContaineeSynthDoc.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,6 @@
  * @author Bhavesh Patel
  */
 @Documented
-@ContainedBy(ContainerSynthNotDoc.class)
+@Repeatable(ContainerSynthNotDoc.class)
 public @interface ContaineeSynthDoc {
 }
--- a/langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerSynthNotDoc.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/com/sun/javadoc/testRepeatedAnnotations/pkg1/ContainerSynthNotDoc.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
  *
  * @author Bhavesh Patel
  */
-@ContainerFor(ContaineeSynthDoc.class)
 public @interface ContainerSynthNotDoc {
 
     ContaineeSynthDoc[] value();
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/BaseAnnoAsContainerAnno.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/BaseAnnoAsContainerAnno.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,11 +6,9 @@
  * @compile/fail/ref=BaseAnnoAsContainerAnno.out -XDrawDiagnostics BaseAnnoAsContainerAnno.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(Foo.class)
-@ContainerFor(Foo.class)
+@Repeatable(Foo.class)
 @interface Foo {
     Foo[] value() default {};
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/BaseAnnoAsContainerAnno.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/BaseAnnoAsContainerAnno.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,2 +1,2 @@
-BaseAnnoAsContainerAnno.java:15:11: compiler.err.cyclic.annotation.element
+BaseAnnoAsContainerAnno.java:13:11: compiler.err.cyclic.annotation.element
 1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/BasicRepeatingAnnotations.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/BasicRepeatingAnnotations.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,10 +34,9 @@
 import java.lang.annotation.*;
 
 @Retention(RetentionPolicy.RUNTIME)
-@ContainedBy(Foos.class)
+@Repeatable(Foos.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @Retention(RetentionPolicy.RUNTIME)
 @interface Foos {
     Foo[] value();
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/CheckTargets.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/CheckTargets.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,32 +32,29 @@
 
 import java.lang.annotation.*;
 
-@ContainedBy(Foos.class)
+@Repeatable(Foos.class)
 @Target(ElementType.TYPE)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @Target(ElementType.ANNOTATION_TYPE)
 @interface Foos {
     Foo[] value();
 }
 
-@ContainedBy(Bars.class)
+@Repeatable(Bars.class)
 @Target(ElementType.TYPE)
 @interface Bar {}
 
-@ContainerFor(Bar.class)
 @Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
 @interface Bars {
     Bar[] value();
 }
 
 
-@ContainedBy(Bazs.class)
+@Repeatable(Bazs.class)
 @Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE })
 @interface Baz {}
 
-@ContainerFor(Baz.class)
 @Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
 @interface Bazs {
     Baz[] value();
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/ClassReaderDefault.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/ClassReaderDefault.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,17 +30,15 @@
  * @compile ClassReaderDefault.java
  * @compile SeparateCompile.java
  */
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
 public class ClassReaderDefault {
 }
 
-@ContainerFor(Foo.class)
 @interface FooContainer {
      Foo[] value();
      int f() default 0;
 }
 
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {}
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/ContainerHasRepeatedContained.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/ContainerHasRepeatedContained.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,15 +30,13 @@
  * @run compile ContainerHasRepeatedContained.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(BarContainer.class)
+@Repeatable(BarContainer.class)
 @interface Bar {}
 
 @Bar
 @Bar
-@ContainerFor(Bar.class)
 @interface BarContainer {
     Bar[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/CyclicAnnotation.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/CyclicAnnotation.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,17 +6,14 @@
  * @compile/fail/ref=CyclicAnnotation.out -XDrawDiagnostics CyclicAnnotation.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(Foo.class)
-@ContainerFor(Baz.class)
+@Repeatable(Foo.class)
 @interface Baz {
     Foo[] value() default {};
 }
 
-@ContainedBy(Baz.class)
-@ContainerFor(Foo.class)
+@Repeatable(Baz.class)
 @interface Foo{
     Baz[] value() default {};
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/CyclicAnnotation.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/CyclicAnnotation.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,6 +1,2 @@
-CyclicAnnotation.java:12:1: compiler.err.invalid.container.wrong.containerfor: Foo, Baz
-CyclicAnnotation.java:13:1: compiler.err.invalid.container.wrong.containedby: Foo, Baz
-CyclicAnnotation.java:15:11: compiler.err.cyclic.annotation.element
-CyclicAnnotation.java:18:1: compiler.err.invalid.container.wrong.containerfor: Baz, Foo
-CyclicAnnotation.java:19:1: compiler.err.invalid.container.wrong.containedby: Baz, Foo
-5 errors
+CyclicAnnotation.java:13:11: compiler.err.cyclic.annotation.element
+1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/DefaultCasePresent.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/DefaultCasePresent.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,13 +29,11 @@
  * @compile DefaultCasePresent.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @interface FooContainer {
     Foo[] value();
     String other() default "other-method";
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/DelayRepeatedContainer.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/DelayRepeatedContainer.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,12 +39,11 @@
 
 @Bar("katt")
 @Bar("lol")
-@ContainedBy(BarContainer.class)
+@Repeatable(BarContainer.class)
 @interface Bar {
     String value();
 }
 
-@ContainerFor(Bar.class)
 @interface BarContainer {
     Bar[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/DocumentedContainerAnno.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/DocumentedContainerAnno.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,15 +6,13 @@
  * @compile/fail/ref=DocumentedContainerAnno.out -XDrawDiagnostics DocumentedContainerAnno.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 import java.lang.annotation.Documented;
 
 @Documented
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @interface FooContainer{
     Foo[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/DocumentedContainerAnno.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/DocumentedContainerAnno.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,2 +1,2 @@
-DocumentedContainerAnno.java:14:1: compiler.err.invalid.containedby.annotation.not.documented: FooContainer, Foo
+DocumentedContainerAnno.java:13:1: compiler.err.invalid.repeatable.annotation.not.documented: FooContainer, Foo
 1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/InheritedContainerAnno.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/InheritedContainerAnno.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,15 +6,13 @@
  * @compile/fail/ref=InheritedContainerAnno.out -XDrawDiagnostics InheritedContainerAnno.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 import java.lang.annotation.Inherited;
 
 @Inherited
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @interface FooContainer{
     Foo[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/InheritedContainerAnno.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/InheritedContainerAnno.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,2 +1,2 @@
-InheritedContainerAnno.java:14:1: compiler.err.invalid.containedby.annotation.not.inherited: FooContainer, Foo
+InheritedContainerAnno.java:13:1: compiler.err.invalid.repeatable.annotation.not.inherited: FooContainer, Foo
 1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/InvalidTarget.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/InvalidTarget.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,11 +32,10 @@
 
 import java.lang.annotation.*;
 
-@ContainedBy(Foos.class)
+@Repeatable(Foos.class)
 @Target(ElementType.ANNOTATION_TYPE)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @Target(ElementType.TYPE)
 @interface Foos {
     Foo[] value();
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainedBy.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @summary Smoke test for repeating annotations
- * @compile/fail MissingContainedBy.java
- * @bug 7151010
- */
-
-import java.lang.annotation.*;
-
-
-@ContainerFor(MissingContainedBy.class)
-@interface Foos {
-    MissingContainedBy[] value();
-}
-
-public @interface MissingContainedBy {}
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainer.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainer.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,13 +6,11 @@
  * @compile/fail/ref=MissingContainer.out -XDrawDiagnostics MissingContainer.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy()
+@Repeatable()
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @interface FooContainer {
     Foo[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainer.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainer.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,4 @@
-MissingContainer.java:20:1: compiler.err.invalid.containedby.annotation: Foo
-MissingContainer.java:20:6: compiler.err.invalid.containedby.annotation: Foo
-MissingContainer.java:12:1: compiler.err.annotation.missing.default.value: java.lang.annotation.ContainedBy, value
-MissingContainer.java:15:1: compiler.err.invalid.container.wrong.containedby: Foo, FooContainer
-4 errors
+MissingContainer.java:18:1: compiler.err.invalid.repeatable.annotation: Foo
+MissingContainer.java:18:6: compiler.err.invalid.repeatable.annotation: Foo
+MissingContainer.java:11:1: compiler.err.annotation.missing.default.value: java.lang.annotation.Repeatable, value
+3 errors
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingContainerFor.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @summary Smoke test for repeating annotations
- * @compile/fail MissingContainerFor.java
- * @bug 7151010
- */
-
-import java.lang.annotation.*;
-
-@interface Foos {
-    MissingContainerFor[] value();
-}
-
-@ContainedBy(Foos.class)
-public @interface MissingContainerFor {}
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,13 +6,11 @@
  * @compile/fail/ref=MissingDefaultCase1.out -XDrawDiagnostics MissingDefaultCase1.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @interface FooContainer {
     Foo[] value();
     String other();  // missing default clause
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,3 +1,3 @@
-MissingDefaultCase1.java:21:1: compiler.err.duplicate.annotation.invalid.repeated: Foo
-MissingDefaultCase1.java:12:1: compiler.err.invalid.containedby.annotation.elem.nondefault: FooContainer, other()
+MissingDefaultCase1.java:19:1: compiler.err.duplicate.annotation.invalid.repeated: Foo
+MissingDefaultCase1.java:11:1: compiler.err.invalid.repeatable.annotation.elem.nondefault: FooContainer, other()
 2 errors
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,13 +6,11 @@
  * @compile/fail/ref=MissingDefaultCase2.out -XDrawDiagnostics MissingDefaultCase2.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @interface FooContainer {
     Foo[] value();
     Foo other();  // missing default clause and return type is an annotation
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,3 +1,3 @@
-MissingDefaultCase2.java:21:1: compiler.err.duplicate.annotation.invalid.repeated: Foo
-MissingDefaultCase2.java:12:1: compiler.err.invalid.containedby.annotation.elem.nondefault: FooContainer, other()
+MissingDefaultCase2.java:19:1: compiler.err.duplicate.annotation.invalid.repeated: Foo
+MissingDefaultCase2.java:11:1: compiler.err.invalid.repeatable.annotation.elem.nondefault: FooContainer, other()
 2 errors
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,13 +6,11 @@
  * @compile/fail/ref=MissingValueMethod.out -XDrawDiagnostics MissingValueMethod.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @interface FooContainer{
     Foo[] values();  // wrong method name
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,4 +1,4 @@
-MissingValueMethod.java:20:1: compiler.err.invalid.containedby.annotation.no.value: FooContainer
-MissingValueMethod.java:20:6: compiler.err.invalid.containedby.annotation.no.value: FooContainer
-MissingValueMethod.java:12:1: compiler.err.invalid.containedby.annotation.elem.nondefault: FooContainer, values()
+MissingValueMethod.java:18:1: compiler.err.invalid.repeatable.annotation.no.value: FooContainer
+MissingValueMethod.java:18:6: compiler.err.invalid.repeatable.annotation.no.value: FooContainer
+MissingValueMethod.java:11:1: compiler.err.invalid.repeatable.annotation.no.value: FooContainer
 3 errors
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MultiLevelRepeatableAnno.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MultiLevelRepeatableAnno.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,19 +29,16 @@
  * @compile MultiLevelRepeatableAnno.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {}
 
-@ContainedBy(FooContainerContainer.class)
-@ContainerFor(Foo.class)
+@Repeatable(FooContainerContainer.class)
 @interface FooContainer {
     Foo[] value();
 }
 
-@ContainerFor(FooContainer.class)
 @interface FooContainerContainer {
   FooContainer[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/MultipleAnnoMixedOrder.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/MultipleAnnoMixedOrder.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,25 +29,22 @@
  * @compile MultipleAnnoMixedOrder.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {
     int getNumbers();
 }
 
-@ContainerFor(Foo.class)
 @interface FooContainer {
   Foo[] value();
 }
 
-@ContainedBy(BazContainer.class)
+@Repeatable(BazContainer.class)
 @interface Baz {
     String getStr();
 }
 
-@ContainerFor(Baz.class)
 @interface BazContainer {
   Baz[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/NestedContainers.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/NestedContainers.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,17 +34,15 @@
 import java.lang.annotation.*;
 
 @Retention(RetentionPolicy.RUNTIME)
-@ContainedBy(Foos.class)
+@Repeatable(Foos.class)
 @interface Foo {}
 
 @Retention(RetentionPolicy.RUNTIME)
-@ContainedBy(FoosFoos.class)
-@ContainerFor(Foo.class)
+@Repeatable(FoosFoos.class)
 @interface Foos {
     Foo[] value();
 }
 
-@ContainerFor(Foos.class)
 @Retention(RetentionPolicy.RUNTIME)
 @interface FoosFoos {
     Foos[] value();
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/NoRepeatableAnno.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/NoRepeatableAnno.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,3 +1,3 @@
-NoRepeatableAnno.java:11:1: compiler.err.duplicate.annotation.missing.container: Foo, java.lang.annotation.ContainedBy
-NoRepeatableAnno.java:11:6: compiler.err.duplicate.annotation.missing.container: Foo, java.lang.annotation.ContainedBy
+NoRepeatableAnno.java:11:1: compiler.err.duplicate.annotation.missing.container: Foo, java.lang.annotation.Repeatable
+NoRepeatableAnno.java:11:6: compiler.err.duplicate.annotation.missing.container: Foo, java.lang.annotation.Repeatable
 2 errors
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/RepMemberAnno.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/RepMemberAnno.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,20 +30,18 @@
  * @run compile RepMemberAnno.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
 public class RepMemberAnno {
     @Bar("Apa") @Bar("Banan")
     public void meh() {}
 }
 
-@ContainedBy(BarContainer.class)
+@Repeatable(BarContainer.class)
 @interface Bar {
     String value();
 }
 
-@ContainerFor(Bar.class)
 @interface BarContainer {
     Bar[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/RepSelfMemberAnno.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/RepSelfMemberAnno.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,21 +34,19 @@
 
 
 @Retention(RetentionPolicy.RUNTIME)
-@ContainedBy(BarContainer.class)
+@Repeatable(BarContainer.class)
 public @interface RepSelfMemberAnno {
     @RepSelfMemberAnno @RepSelfMemberAnno
     String meh() default "banan";
 }
 
 
-@ContainedBy(BarContainerContainer.class)
+@Repeatable(BarContainerContainer.class)
 @Retention(RetentionPolicy.RUNTIME)
-@ContainerFor(RepSelfMemberAnno.class)
 @interface BarContainer {
     RepSelfMemberAnno[] value();
 }
 
-@ContainerFor(BarContainer.class)
 @Retention(RetentionPolicy.RUNTIME)
 @interface BarContainerContainer {
     BarContainer[] value();
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingAndContainerPresent.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingAndContainerPresent.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
 
 import java.lang.annotation.*;
 
-@ContainedBy(Foos.class)
+@Repeatable(Foos.class)
 @interface Foo {}
 
 @interface Foos {
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingTargetNotAllowed.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingTargetNotAllowed.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,10 +31,9 @@
 
 import java.lang.annotation.*;
 
-@ContainedBy(Foos.class)
+@Repeatable(Foos.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @Target(ElementType.ANNOTATION_TYPE)
 @interface Foos {
     Foo[] value();
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingTargetNotAllowed.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/RepeatingTargetNotAllowed.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,2 +1,2 @@
-RepeatingTargetNotAllowed.java:44:5: compiler.err.invalid.containedby.annotation.incompatible.target: Foos, Foo
+RepeatingTargetNotAllowed.java:43:5: compiler.err.invalid.repeatable.annotation.incompatible.target: Foos, Foo
 1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/SelfRepeatingAnnotations.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/SelfRepeatingAnnotations.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,6 @@
 
 import java.lang.annotation.*;
 
-@ContainerFor(SelfRepeatingAnno.class)
 @Retention(RetentionPolicy.RUNTIME)
 @interface Foos {
     SelfRepeatingAnno[] value();
@@ -42,7 +41,7 @@
 @SelfRepeatingAnno
 @Retention(RetentionPolicy.RUNTIME)
 @SelfRepeatingAnno
-@ContainedBy(Foos.class)
+@Repeatable(Foos.class)
 @interface SelfRepeatingAnno {}
 
 public class SelfRepeatingAnnotations {
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/SingleRepeatingAndContainer.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/SingleRepeatingAndContainer.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,10 +30,9 @@
 
 import java.lang.annotation.*;
 
-@ContainedBy(Foos.class)
+@Repeatable(Foos.class)
 @interface Foo {}
 
-@ContainerFor(Foo.class)
 @interface Foos {
     Foo[] value();
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongContainedBy.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @summary Smoke test for repeating annotations
- * @compile/fail UseWrongContainedBy.java
- * @bug 7151010
- */
-
-import java.lang.annotation.*;
-
-@ContainerFor(UseWrongContainedBy.class)
-@interface Foos {
-    UseWrongContainedBy[] value();
-}
-
-@ContainedBy(Target.class)
-public @interface UseWrongContainedBy {}
-
-@UseWrongContainedBy @UseWrongContainedBy
-@interface Foo {}
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongContainerFor.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @summary Smoke test for repeating annotations
- * @compile/fail UseWrongContainerFor.java
- * @bug 7151010
- */
-
-import java.lang.annotation.*;
-
-@ContainerFor(Retention.class)
-@interface Foos {
-    UseWrongContainerFor[] value();
-}
-
-@ContainedBy(Foos.class)
-public @interface UseWrongContainerFor {}
-
-@UseWrongContainerFor @UseWrongContainerFor
-@interface Foo {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/UseWrongRepeatable.java	Mon Jan 14 13:50:01 2013 -0800
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @summary Smoke test for repeating annotations
+ * @compile/fail UseWrongRepeatable.java
+ * @bug 7151010
+ */
+
+import java.lang.annotation.*;
+
+@interface Foos {
+    UseWrongRepeatable[] value();
+}
+
+@Repeatable(Target.class)
+public @interface UseWrongRepeatable {}
+
+@UseWrongRepeatable @UseWrongRepeatable
+@interface Foo {}
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/WrongContainedBy.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @summary Smoke test for repeating annotations
- * @compile/fail WrongContainedBy.java
- * @bug 7151010
- */
-
-import java.lang.annotation.*;
-
-@ContainerFor(WrongContainedBy.class)
-@interface Foos {
-    WrongContainedBy[] value();
-}
-
-@ContainedBy(Target.class)
-public @interface WrongContainedBy {}
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/WrongContainerFor.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test
- * @summary Smoke test for repeating annotations
- * @compile/fail WrongContainerFor.java
- * @bug 7151010
- */
-
-import java.lang.annotation.*;
-
-@ContainerFor(Retention.class)
-@interface Foos {
-    WrongContainerFor[] value();
-}
-
-@ContainedBy(Foos.class)
-public @interface WrongContainerFor {}
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/WrongReturnTypeForValue.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/WrongReturnTypeForValue.java	Mon Jan 14 13:50:01 2013 -0800
@@ -6,15 +6,13 @@
  * @compile/fail/ref=WrongReturnTypeForValue.out -XDrawDiagnostics WrongReturnTypeForValue.java
  */
 
-import java.lang.annotation.ContainedBy;
-import java.lang.annotation.ContainerFor;
+import java.lang.annotation.Repeatable;
 
-@ContainedBy(FooContainer.class)
+@Repeatable(FooContainer.class)
 @interface Foo {
     int getNumbers();
 }
 
-@ContainerFor(Foo.class)
 @interface FooContainer{
     Foo value();     // wrong return type
 }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/WrongReturnTypeForValue.out	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/WrongReturnTypeForValue.out	Mon Jan 14 13:50:01 2013 -0800
@@ -1,3 +1,4 @@
-WrongReturnTypeForValue.java:22:1: compiler.err.invalid.containedby.annotation.value.return: FooContainer, Foo, Foo[]
-WrongReturnTypeForValue.java:22:6: compiler.err.invalid.containedby.annotation.value.return: FooContainer, Foo, Foo[]
-2 errors
+WrongReturnTypeForValue.java:20:1: compiler.err.invalid.repeatable.annotation.value.return: FooContainer, Foo, Foo[]
+WrongReturnTypeForValue.java:20:6: compiler.err.invalid.repeatable.annotation.value.return: FooContainer, Foo, Foo[]
+WrongReturnTypeForValue.java:11:1: compiler.err.invalid.repeatable.annotation.value.return: FooContainer, Foo, Foo[]
+3 errors
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/BasicSyntaxCombo.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/BasicSyntaxCombo.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -163,9 +163,8 @@
         String replaceStr = "/*"+type+"*/";
         StringBuilder annoData = new StringBuilder();
         annoData.append(Helper.ContentVars.IMPORTCONTAINERSTMTS.getVal())
-                .append(Helper.ContentVars.CONTAINERFOR.getVal())
                 .append(Helper.ContentVars.CONTAINER.getVal())
-                .append(Helper.ContentVars.CONTAINEDBY.getVal())
+                .append(Helper.ContentVars.REPEATABLE.getVal())
                 .append(Helper.ContentVars.BASE.getVal());
 
         JavaFileObject pkgInfoFile = null;
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DeprecatedAnnoCombo.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DeprecatedAnnoCombo.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -115,24 +115,21 @@
         switch(className) {
         case "DeprecatedonBoth":
             annoData.append(Helper.ContentVars.DEPRECATED.getVal())
-                    .append(Helper.ContentVars.CONTAINERFOR.getVal())
                     .append(Helper.ContentVars.CONTAINER.getVal())
                     .append(Helper.ContentVars.DEPRECATED.getVal())
-                    .append(Helper.ContentVars.CONTAINEDBY.getVal())
+                    .append(Helper.ContentVars.REPEATABLE.getVal())
                     .append(Helper.ContentVars.BASE.getVal());
             break;
         case "DeprecatedonBase":
-            annoData.append(Helper.ContentVars.CONTAINERFOR.getVal())
-                    .append(Helper.ContentVars.CONTAINER.getVal())
+            annoData.append(Helper.ContentVars.CONTAINER.getVal())
                     .append(Helper.ContentVars.DEPRECATED.getVal())
-                    .append(Helper.ContentVars.CONTAINEDBY.getVal())
+                    .append(Helper.ContentVars.REPEATABLE.getVal())
                     .append(Helper.ContentVars.BASE.getVal());
             break;
         case "DeprecatedonContainer":
             annoData.append(Helper.ContentVars.DEPRECATED.getVal())
-                    .append(Helper.ContentVars.CONTAINERFOR.getVal())
                     .append(Helper.ContentVars.CONTAINER.getVal())
-                    .append(Helper.ContentVars.CONTAINEDBY.getVal())
+                    .append(Helper.ContentVars.REPEATABLE.getVal())
                     .append(Helper.ContentVars.BASE.getVal());
             break;
         }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DocumentedAnnoCombo.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DocumentedAnnoCombo.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -93,17 +93,15 @@
         switch(className) {
             case "DocumentedonBothAnno":
                 annoData.append(Helper.ContentVars.DOCUMENTED.getVal())
-                .append(Helper.ContentVars.CONTAINERFOR.getVal())
                 .append(Helper.ContentVars.CONTAINER.getVal())
                 .append(Helper.ContentVars.DOCUMENTED.getVal())
-                .append(Helper.ContentVars.CONTAINEDBY.getVal())
+                .append(Helper.ContentVars.REPEATABLE.getVal())
                 .append(Helper.ContentVars.BASE.getVal());
             break;
             case "DocumentedonContainer":
                 annoData.append(Helper.ContentVars.DOCUMENTED.getVal())
-                .append(Helper.ContentVars.CONTAINERFOR.getVal())
                 .append(Helper.ContentVars.CONTAINER.getVal())
-                .append(Helper.ContentVars.CONTAINEDBY.getVal())
+                .append(Helper.ContentVars.REPEATABLE.getVal())
                 .append(Helper.ContentVars.BASE.getVal());
             break;
         }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,15 +34,13 @@
 public class Helper {
 
     enum ContentVars {
-        IMPORTCONTAINERSTMTS("\nimport java.lang.annotation.ContainedBy;\n" +
-                            "\nimport java.lang.annotation.ContainerFor;\n"),
+        IMPORTCONTAINERSTMTS("\nimport java.lang.annotation.Repeatable;\n"),
         IMPORTDEPRECATED("import java.lang.Deprecated;\n"),
         IMPORTDOCUMENTED("import java.lang.annotation.Documented;\n"),
         IMPORTINHERITED("import java.lang.annotation.Inherited;\n"),
         IMPORTRETENTION("import java.lang.annotation.Retention;\n" +
                         "\nimport java.lang.annotation.RetentionPolicy;\n"),
-        CONTAINEDBY("\n@ContainedBy(FooContainer.class)\n"),
-        CONTAINERFOR("@ContainerFor(Foo.class)\n"),
+        REPEATABLE("\n@Repeatable(FooContainer.class)\n"),
         CONTAINER("@interface FooContainer {\n" +"  Foo[] value();\n}\n"),
         BASE("@interface Foo {}\n"),
         REPEATABLEANNO("\n@Foo() @Foo()"),
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/InheritedAnnoCombo.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/InheritedAnnoCombo.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -94,17 +94,15 @@
         switch(className) {
         case "InheritedonBothAnno":
             annoData.append(Helper.ContentVars.INHERITED.getVal())
-            .append(Helper.ContentVars.CONTAINERFOR.getVal())
             .append(Helper.ContentVars.CONTAINER.getVal())
             .append(Helper.ContentVars.INHERITED.getVal())
-            .append(Helper.ContentVars.CONTAINEDBY.getVal())
+            .append(Helper.ContentVars.REPEATABLE.getVal())
             .append(Helper.ContentVars.BASE.getVal());
             break;
         case "InheritedonBase":
             annoData.append(Helper.ContentVars.INHERITED.getVal())
-            .append(Helper.ContentVars.CONTAINERFOR.getVal())
             .append(Helper.ContentVars.CONTAINER.getVal())
-            .append(Helper.ContentVars.CONTAINEDBY.getVal())
+            .append(Helper.ContentVars.REPEATABLE.getVal())
             .append(Helper.ContentVars.BASE.getVal());
             break;
         }
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/RetentionAnnoCombo.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/RetentionAnnoCombo.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -120,7 +120,7 @@
                 new DiagnosticCollector<JavaFileObject>();
         boolean ok = compileCode(className, contents, diagnostics);
 
-        String expectedErrKey = "compiler.err.invalid.containedby" +
+        String expectedErrKey = "compiler.err.invalid.repeatable" +
                                         ".annotation.retention";
         if (!shouldCompile && !ok) {
             for (Diagnostic<?> d : diagnostics.getDiagnostics()) {
@@ -175,10 +175,9 @@
         StringBuilder annoData = new StringBuilder();
         annoData.append(Helper.ContentVars.IMPORTCONTAINERSTMTS.getVal())
                 .append(Helper.ContentVars.IMPORTRETENTION.getVal())
-                .append(Helper.ContentVars.CONTAINERFOR.getVal())
                 .append(replacedRetCAVal)
                 .append(Helper.ContentVars.CONTAINER.getVal())
-                .append(Helper.ContentVars.CONTAINEDBY.getVal())
+                .append(Helper.ContentVars.REPEATABLE.getVal())
                 .append(replacedRetBaseVal)
                 .append(Helper.ContentVars.BASE.getVal());
 
--- a/langtools/test/tools/javac/diags/examples.not-yet.txt	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/diags/examples.not-yet.txt	Mon Jan 14 13:50:01 2013 -0800
@@ -5,9 +5,9 @@
 compiler.err.cant.select.static.class.from.param.type
 compiler.err.dc.unterminated.string                     # cannot happen
 compiler.err.illegal.char.for.encoding
-compiler.err.invalid.containedby.annotation             # should not happen
-compiler.err.invalid.containedby.annotation.invalid.value # "can't" happen
-compiler.err.invalid.containedby.annotation.multiple.values # can't happen
+compiler.err.invalid.repeatable.annotation              # should not happen
+compiler.err.invalid.repeatable.annotation.invalid.value # "can't" happen
+compiler.err.invalid.repeatable.annotation.multiple.values # can't happen
 compiler.err.io.exception                               # (javah.JavahTask?)
 compiler.err.limit.code                                 # Code
 compiler.err.limit.code.too.large.for.try.stmt          # Gen
--- a/langtools/test/tools/javac/diags/examples/ContainedByDocumentedMismatch.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.containedby.annotation.not.documented
-
-import java.lang.annotation.*;
-
-@Documented
-@ContainedBy(Annos.class)
-@interface Anno { }
-
-@ContainerFor(Anno.class)
-@interface Annos { Anno[] value(); }
-
-@Anno
-@Anno
-class ContainedByDocumentedMismatch { }
--- a/langtools/test/tools/javac/diags/examples/ContainedByInheritedMismatch.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.containedby.annotation.not.inherited
-
-import java.lang.annotation.*;
-
-@Inherited
-@ContainedBy(Annos.class)
-@interface Anno { }
-
-@ContainerFor(Anno.class)
-@interface Annos { Anno[] value(); }
-
-@Anno
-@Anno
-class ContainedByInheritedMismatch { }
--- a/langtools/test/tools/javac/diags/examples/ContainedByNoValue.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.containedby.annotation.no.value
-
-import java.lang.annotation.*;
-
-@ContainedBy(Annos.class)
-@interface Anno { }
-
-@ContainerFor(Anno.class)
-@interface Annos {}
-
-@Anno
-@Anno
-class ContainedByNoValue { }
--- a/langtools/test/tools/javac/diags/examples/ContainedByNonDefault.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.containedby.annotation.elem.nondefault
-
-import java.lang.annotation.*;
-
-@ContainedBy(Annos.class)
-@interface Anno { }
-
-@ContainerFor(Anno.class)
-@interface Annos { Anno[] value(); String foo(); }
-
-class ContainedByNonDefault { }
--- a/langtools/test/tools/javac/diags/examples/ContainedByRetentionMismatch.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.containedby.annotation.retention
-
-import java.lang.annotation.*;
-
-@Retention(RetentionPolicy.RUNTIME)
-@ContainedBy(Annos.class)
-@interface Anno { }
-
-@ContainerFor(Anno.class)
-@interface Annos { Anno[] value(); }
-
-@Anno
-@Anno
-class ContainedByRetentionMismatch { }
--- a/langtools/test/tools/javac/diags/examples/ContainedByTargetMismatch.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.containedby.annotation.incompatible.target
-
-import java.lang.annotation.*;
-
-@ContainedBy(Annos.class)
-@Target(ElementType.METHOD)
-@interface Anno { }
-
-@ContainerFor(Anno.class)
-@interface Annos { Anno[] value(); }
-
-class ContainedByTargetMismatch { }
--- a/langtools/test/tools/javac/diags/examples/ContainedByWrongValueType.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.containedby.annotation.value.return
-
-import java.lang.annotation.*;
-
-@ContainedBy(Annos.class)
-@interface Anno { }
-
-@ContainerFor(Anno.class)
-@interface Annos { String value(); }
-
-@Anno
-@Anno
-class ContainedByWrongValueType { }
--- a/langtools/test/tools/javac/diags/examples/InvalidDuplicateAnnotation.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/diags/examples/InvalidDuplicateAnnotation.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,17 +22,16 @@
  */
 
 // key: compiler.err.duplicate.annotation.invalid.repeated
-// key: compiler.err.invalid.containedby.annotation.elem.nondefault
-//
+// key: compiler.err.invalid.repeatable.annotation.elem.nondefault
+
 // We need an almost valid containing annotation. The easiest way to get
 // one close enough to valid is by forgetting a default.
 
 import java.lang.annotation.*;
 
-@ContainedBy(Annos.class)
+@Repeatable(Annos.class)
 @interface Anno { }
 
-@ContainerFor(Anno.class)
 @interface Annos { Anno[] value(); String foo(); }
 
 @Anno
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/RepeatableDocumentedMismatch.java	Mon Jan 14 13:50:01 2013 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.invalid.repeatable.annotation.not.documented
+
+import java.lang.annotation.*;
+
+@Documented
+@Repeatable(Annos.class)
+@interface Anno { }
+
+@interface Annos { Anno[] value(); }
+
+@Anno
+@Anno
+class RepeatableDocumentedMismatch { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/RepeatableInheritedMismatch.java	Mon Jan 14 13:50:01 2013 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.invalid.repeatable.annotation.not.inherited
+
+import java.lang.annotation.*;
+
+@Inherited
+@Repeatable(Annos.class)
+@interface Anno { }
+
+@interface Annos { Anno[] value(); }
+
+@Anno
+@Anno
+class RepeatableInheritedMismatch { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/RepeatableNoValue.java	Mon Jan 14 13:50:01 2013 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.invalid.repeatable.annotation.no.value
+
+import java.lang.annotation.*;
+
+@Repeatable(Annos.class)
+@interface Anno { }
+
+@interface Annos {}
+
+@Anno
+@Anno
+class RepeatableNoValue { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/RepeatableNonDefault.java	Mon Jan 14 13:50:01 2013 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.invalid.repeatable.annotation.elem.nondefault
+
+import java.lang.annotation.*;
+
+@Repeatable(Annos.class)
+@interface Anno { }
+
+@interface Annos { Anno[] value(); String foo(); }
+
+class RepeatableNonDefault { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/RepeatableRetentionMismatch.java	Mon Jan 14 13:50:01 2013 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.invalid.repeatable.annotation.retention
+
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(Annos.class)
+@interface Anno { }
+
+@interface Annos { Anno[] value(); }
+
+@Anno
+@Anno
+class RepeatableRetentionMismatch { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/RepeatableTargetMismatch.java	Mon Jan 14 13:50:01 2013 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.invalid.repeatable.annotation.incompatible.target
+
+import java.lang.annotation.*;
+
+@Repeatable(Annos.class)
+@Target(ElementType.METHOD)
+@interface Anno { }
+
+@interface Annos { Anno[] value(); }
+
+class RepeatableTargetMismatch { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/RepeatableWrongValueType.java	Mon Jan 14 13:50:01 2013 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.invalid.repeatable.annotation.value.return
+
+import java.lang.annotation.*;
+
+@Repeatable(Annos.class)
+@interface Anno { }
+
+@interface Annos { String value(); }
+
+@Anno
+@Anno
+class RepeatableWrongValueType { }
--- a/langtools/test/tools/javac/diags/examples/RepeatingAnnotationAndContainer.java	Mon Jan 14 19:52:36 2013 +0100
+++ b/langtools/test/tools/javac/diags/examples/RepeatingAnnotationAndContainer.java	Mon Jan 14 13:50:01 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,14 +21,13 @@
  * questions.
  */
 
-// key: compiler.err.invalid.containedby.annotation.repeated.and.container.present
+// key: compiler.err.invalid.repeatable.annotation.repeated.and.container.present
 
 import java.lang.annotation.*;
 
-@ContainedBy(Annos.class)
+@Repeatable(Annos.class)
 @interface Anno { }
 
-@ContainerFor(Anno.class)
 @interface Annos { Anno[] value(); }
 
 @Anno
--- a/langtools/test/tools/javac/diags/examples/WrongContainedBy.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.container.no.containerfor
-// key: compiler.err.invalid.container.wrong.containedby
-
-import java.lang.annotation.*;
-
-@ContainerFor(WrongContainedBy.class)
-@interface Foos {
-    WrongContainedBy[] value();
-}
-
-@ContainedBy(Target.class)
-public @interface WrongContainedBy {}
--- a/langtools/test/tools/javac/diags/examples/WrongContainerFor.java	Mon Jan 14 19:52:36 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-// key: compiler.err.invalid.container.wrong.containerfor
-// key: compiler.err.invalid.container.no.containedby
-
-import java.lang.annotation.*;
-
-@ContainerFor(Retention.class)
-@interface Foos {
-    WrongContainerFor[] value();
-}
-
-@ContainedBy(Foos.class)
-public @interface WrongContainerFor {}