fix: custom shell NPE

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