Fix NPE issue#12292 (#12293)
Fix NPE issue#12292 Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
This commit is contained in:
parent
c76e97dc61
commit
9c72fdea69
|
|
@ -418,7 +418,7 @@ public interface AnnotationUtils {
|
|||
static boolean isAnnotationPresent(AnnotatedElement annotatedElement, String annotationClassName) {
|
||||
ClassLoader classLoader = annotatedElement.getClass().getClassLoader();
|
||||
Class<?> resolvedType = resolveClass(annotationClassName, classLoader);
|
||||
if (!Annotation.class.isAssignableFrom(resolvedType)) {
|
||||
if (resolvedType == null || !Annotation.class.isAssignableFrom(resolvedType)) {
|
||||
return false;
|
||||
}
|
||||
return isAnnotationPresent(annotatedElement, (Class<? extends Annotation>) resolvedType);
|
||||
|
|
|
|||
Loading…
Reference in New Issue