Skip to content

Commit 7d5a9b6

Browse files
committed
Include container in "java.lang.annotation.AnnotationFormatError: Duplicate annotation for class" error
Signed-off-by: Scott Marlow <[email protected]>
1 parent bd6d911 commit 7d5a9b6

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

Lines changed: 1 addition & 1 deletion
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)