langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java
changeset 40504 0a01f6710c84
parent 34762 d68b7daca533
child 41031 9075bf88387b
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Mon Aug 15 22:14:25 2016 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Tue Aug 16 16:43:00 2016 +0200
@@ -54,6 +54,7 @@
 import static com.sun.tools.javac.tree.JCTree.Tag.ASSIGN;
 import static com.sun.tools.javac.tree.JCTree.Tag.IDENT;
 import static com.sun.tools.javac.tree.JCTree.Tag.NEWARRAY;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 
 /** Enter annotations onto symbols and types (and trees).
  *
@@ -302,7 +303,6 @@
     {
         Map<TypeSymbol, ListBuffer<T>> annotated = new LinkedHashMap<>();
         Map<T, DiagnosticPosition> pos = new HashMap<>();
-        boolean allowRepeatedAnnos = this.allowRepeatedAnnos;
 
         for (List<JCAnnotation> al = withAnnotations; !al.isEmpty(); al = al.tail) {
             JCAnnotation a = al.head;
@@ -322,8 +322,7 @@
 
             if (annotated.containsKey(a.type.tsym)) {
                 if (!allowRepeatedAnnos) {
-                    log.error(a.pos(), "repeatable.annotations.not.supported.in.source");
-                    allowRepeatedAnnos = true;
+                    log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), "repeatable.annotations.not.supported.in.source");
                 }
                 ListBuffer<T> l = annotated.get(a.type.tsym);
                 l = l.append(c);