8345614: Improve AnnotationFormatError message for duplicate annotation interfaces

Reviewed-by: liach
This commit is contained in:
Scott Marlow 2024-12-09 14:59:59 +00:00 committed by Chen Liang
parent 35c00532a1
commit 7aa0cbc91d

View file

@ -123,7 +123,7 @@ public class AnnotationParser {
if (AnnotationType.getInstance(klass).retention() == RetentionPolicy.RUNTIME &&
result.put(klass, a) != null) {
throw new AnnotationFormatError(
"Duplicate annotation for class: "+klass+": " + a);
"Duplicate annotation " + klass + " in " + container);
}
}
}