langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java
changeset 41031 9075bf88387b
parent 40504 0a01f6710c84
child 41637 7b24b4c32ee6
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu Sep 15 21:08:49 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Fri Sep 16 11:58:23 2016 -0600
@@ -92,6 +92,7 @@
 
     private final Attribute theUnfinishedDefaultValue;
     private final boolean allowRepeatedAnnos;
+    private final String sourceName;
 
     protected Annotate(Context context) {
         context.put(annotateKey, this);
@@ -114,6 +115,7 @@
 
         Source source = Source.instance(context);
         allowRepeatedAnnos = source.allowRepeatedAnnotations();
+        sourceName = source.name;
     }
 
     /** Semaphore to delay annotation processing */
@@ -322,7 +324,7 @@
 
             if (annotated.containsKey(a.type.tsym)) {
                 if (!allowRepeatedAnnos) {
-                    log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), "repeatable.annotations.not.supported.in.source");
+                    log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), "repeatable.annotations.not.supported.in.source", sourceName);
                 }
                 ListBuffer<T> l = annotated.get(a.type.tsym);
                 l = l.append(c);