6919944: incorrect position given for duplicate annotation value error
Reviewed-by: darcy
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Tue Jan 26 11:15:49 2010 -0800
@@ -2047,7 +2047,7 @@
Symbol m = TreeInfo.symbol(assign.lhs);
if (m == null || m.type.isErroneous()) continue;
if (!members.remove(m))
- log.error(arg.pos(), "duplicate.annotation.member.value",
+ log.error(assign.lhs.pos(), "duplicate.annotation.member.value",
m.name, a.type);
if (assign.rhs.getTag() == ANNOTATION)
validateAnnotation((JCAnnotation)assign.rhs);
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/arrayclass/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:10:45: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:10:37: compiler.err.duplicate.annotation.member.value: value, A
1 error
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/arrays/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:10:34: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:10:26: compiler.err.duplicate.annotation.member.value: value, A
1 error
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values for type parameter
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/innertypeparams/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:10:39: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:10:31: compiler.err.duplicate.annotation.member.value: value, A
1 error
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/newarray/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:10:51: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:10:43: compiler.err.duplicate.annotation.member.value: value, A
1 error
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values for type parameter
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/parambounds/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:8:64: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:8:56: compiler.err.duplicate.annotation.member.value: value, A
1 error
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values in receiver
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/receiver/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:9:37: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:9:29: compiler.err.duplicate.annotation.member.value: value, A
1 error
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values for type parameter
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/typeArgs/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:9:50: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:9:42: compiler.err.duplicate.annotation.member.value: value, A
1 error
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values for type parameter
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/typeparams/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:8:54: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:8:46: compiler.err.duplicate.annotation.member.value: value, A
1 error
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.java Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.java Tue Jan 26 11:15:49 2010 -0800
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6843077
+ * @bug 6843077 6919944
* @summary check for duplicate annotation values for type parameter
* @author Mahmood Ali
* @compile/fail/ref=DuplicateAnnotationValue.out -XDrawDiagnostics -source 1.7 DuplicateAnnotationValue.java
--- a/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.out Wed Jan 20 16:12:26 2010 -0800
+++ b/langtools/test/tools/javac/typeAnnotations/failures/common/wildcards/DuplicateAnnotationValue.out Tue Jan 26 11:15:49 2010 -0800
@@ -1,2 +1,2 @@
-DuplicateAnnotationValue.java:9:50: compiler.err.duplicate.annotation.member.value: value, A
+DuplicateAnnotationValue.java:9:42: compiler.err.duplicate.annotation.member.value: value, A
1 error