Browse Source

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
pull/34532/merge
Sam Brannen 2 weeks ago
parent
commit
2c6ccaea05
  1. 2
      spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java

2
spring-core/src/main/java/org/springframework/core/annotation/AttributeMethods.java

@ -113,7 +113,7 @@ final class AttributeMethods { @@ -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;
}

Loading…
Cancel
Save