Browse Source
Prior to this commit, meta-annotations were unnecessarily synthesized when attempting to synthesize a MergedAnnotation retrieved via the MergedAnnotations.from(AnnotatedElement, ...).get(<annotationType>) API. This is a regression in our merged annotation support that was introduced when the MergedAnnotations API replaced our previous support. This commit fixes this by revising the logic in TypeMappedAnnotation's createSynthesizedAnnotation() method so that a meta-annotation is returned unmodified if it is not synthesizable. This commit also updates BootstrapUtilsTests, since @BootstrapWith should never have been synthesized, and Class#getCanonicalName() is only used in the toString() implementation of an annotation synthesized by Spring or normal annotations on Java 19+ (see https://bugs.openjdk.org/browse/JDK-8281462). Closes gh-28704pull/32614/head
3 changed files with 58 additions and 10 deletions
Loading…
Reference in new issue