From 2c6ccaea052cb59ef20c267a073b015a03aa6f2b Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:15:53 +0100 Subject: [PATCH] Use simple type name for meta-annotation in log message In contrast to the previous commit, a warning similar to the following is now logged in such cases. WARN o.s.c.a.MergedAnnotation - Failed to introspect meta-annotation @MyAnnotation on class example.Config: java.lang.TypeNotPresentException: Type example.OptionalDependency not present See gh-35927 --- .../org/springframework/core/annotation/AttributeMethods.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java b/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java index a8ad9efbf22..0e998b84b1a 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java @@ -113,7 +113,7 @@ final class AttributeMethods { // TypeNotPresentException etc. -> annotation type not actually loadable. if (failureLogger.isEnabled()) { failureLogger.log("Failed to introspect meta-annotation @" + - getName(annotation.annotationType()), source, ex); + annotation.annotationType().getSimpleName(), source, ex); } return false; }