Skip to content

Commit

Permalink
Fix NPE issue#12292 (#12293)
Browse files Browse the repository at this point in the history
Fix NPE issue#12292

Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
  • Loading branch information
CodePlayer and AlbumenJ authored May 19, 2023
1 parent c76e97d commit 9c72fde
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ static boolean isAnnotationPresent(Class<?> type, Class<? extends Annotation> an
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);
Expand Down

0 comments on commit 9c72fde

Please sign in to comment.