Browse Source
Prior to this commit, if a meta-annotation could not be loaded because its attributes referenced types not present in the classpath, the meta-annotation was silently ignored. To improve diagnostics for such use cases, this commit introduces WARN support in IntrospectionFailureLogger and revises AttributeMethods.canLoad() to log a warning if a meta-annotation is ignored due to an exception thrown while attempting to load its attributes. For example, a warning similar to the following is now logged in such cases. WARN o.s.c.a.MergedAnnotation - Failed to introspect meta-annotation @example.MyAnnotation on class example.Config: java.lang.TypeNotPresentException: Type example.OptionalDependency not present This commit also improves log messages in AnnotationTypeMappings. Closes gh-35927pull/34532/merge
5 changed files with 31 additions and 11 deletions
Loading…
Reference in new issue