fix: custom shell NPE

This commit is contained in:
ReaJason
2025-11-20 00:36:25 +08:00
parent 0c041ee1a9
commit 726a5321db
@@ -24,7 +24,7 @@ public class ListenerGenerator {
"getResponseFromRequest", newClassName, ShellCommonUtil.class.getName()))
.visit(Advice.to(implInterceptor).on(named("getResponseFromRequest")));
boolean methodNotFound = TypeDescription.ForLoadedType.of(targetClass)
boolean methodNotFound = targetClass != null && TypeDescription.ForLoadedType.of(targetClass)
.getDeclaredMethods()
.filter(named("getFieldValue")
.and(takesArguments(Object.class, String.class)))