Skip to content

Commit 41ea8e0

Browse files
liachPaul Hohensee
authored and
Paul Hohensee
committed
8345614: Improve AnnotationFormatError message for duplicate annotation interfaces
Backport-of: 7aa0cbc91d90493a3dae973cb8077cfa283c32b4
1 parent 934aacc commit 41ea8e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private static Map<Class<? extends Annotation>, Annotation> parseAnnotations2(
123123
if (AnnotationType.getInstance(klass).retention() == RetentionPolicy.RUNTIME &&
124124
result.put(klass, a) != null) {
125125
throw new AnnotationFormatError(
126-
"Duplicate annotation for class: "+klass+": " + a);
126+
"Duplicate annotation " + klass + " in " + container);
127127
}
128128
}
129129
}

0 commit comments

Comments
 (0)