Skip to content

Commit 91e7582

Browse files
liachshipilev
authored andcommitted
8345614: Improve AnnotationFormatError message for duplicate annotation interfaces
Backport-of: 7aa0cbc91d90493a3dae973cb8077cfa283c32b4
1 parent 6d11231 commit 91e7582

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
@@ -124,7 +124,7 @@ private static Map<Class<? extends Annotation>, Annotation> parseAnnotations2(
124124
if (AnnotationType.getInstance(klass).retention() == RetentionPolicy.RUNTIME &&
125125
result.put(klass, a) != null) {
126126
throw new AnnotationFormatError(
127-
"Duplicate annotation for class: "+klass+": " + a);
127+
"Duplicate annotation " + klass + " in " + container);
128128
}
129129
}
130130
}

0 commit comments

Comments
 (0)