fix: custom shell NPE

This commit is contained in:
ReaJason
2025-11-20 00:36:25 +08:00
parent d179ceada7
commit 4134c7233b
@@ -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)))