diff --git a/Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java b/Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java index 9162442..4ea8188 100644 --- a/Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java +++ b/Bcore/src/main/java/top/niunaijun/blackbox/core/VMCore.java @@ -160,7 +160,20 @@ public class VMCore { } } - Method[] declaredMethods = aClass.getDeclaredMethods(); + try { + Method[] declaredMethods = aClass.getDeclaredMethods(); + for (Method declaredMethod : declaredMethods) { + if (declaredMethod.getName().equals(methodName)) { + String desc = MethodUtils.getDesc(declaredMethod); + if (desc.equals(signature)) { + return declaredMethod; + } + } + } + } catch (Throwable ignored) { + } + + Method[] declaredMethods = aClass.getMethods(); for (Method declaredMethod : declaredMethods) { if (declaredMethod.getName().equals(methodName)) { String desc = MethodUtils.getDesc(declaredMethod);