From 7aa0cbc91d90493a3dae973cb8077cfa283c32b4 Mon Sep 17 00:00:00 2001 From: Scott Marlow Date: Mon, 9 Dec 2024 14:59:59 +0000 Subject: [PATCH] 8345614: Improve AnnotationFormatError message for duplicate annotation interfaces Reviewed-by: liach --- .../share/classes/sun/reflect/annotation/AnnotationParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java b/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java index e5a3e636c2c75..82751e3fcd293 100644 --- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java +++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java @@ -123,7 +123,7 @@ private static Map, Annotation> parseAnnotations2( 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); } } }