Align with JDK by throwing TypeNotPresentException in MergedAnnotations
Prior to this commit, we used ClassUtils.resolveClassName() in TypeMappedAnnotation.adapt(...) which throws an IllegalStateException or IllegalArgumentException if a type referenced by an annotation attribute cannot be loaded. However, if such an error occurs while using the JDK's reflection APIs, a TypeNotPresentException is thrown instead. In order to align with the standard behavior of the JDK, this commit modifies TypeMappedAnnotation.adapt(...) to use ClassUtils.forName() and throw a TypeNotPresentException in such scenarios. This commit also makes similar changes in MergedAnnotationReadingVisitor and ClassFileAnnotationDelegate. Closes gh-36593
S
Sam Brannen committed
f993e9710d44729c5d767077ae754605f05af014
Parent: 822001c