fix: null check
This commit is contained in:
@@ -13,7 +13,7 @@ public class ReflectionUtils {
|
||||
Method method = context.getClass().getMethod(methodName);
|
||||
method.setAccessible(true);
|
||||
Object result = method.invoke(context);
|
||||
if (clazz.isAssignableFrom(result.getClass())) {
|
||||
if (result != null && clazz.isAssignableFrom(result.getClass())) {
|
||||
return (T) result;
|
||||
}
|
||||
} catch (NoSuchMethodException e) {
|
||||
|
||||
Reference in New Issue
Block a user