Commit b1fa5c26 authored by swift_gan's avatar swift_gan

[HookWrapper]tweak logic of search backup

parent 4cb97b59
......@@ -5,7 +5,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD})
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface SkipParamCheck {
}
......@@ -317,8 +317,12 @@ public class HookWrapper {
private static boolean samePars(ClassLoader classLoader, Field field, Class[] par) {
try {
Class[] parsOnField = parseMethodPars(classLoader, field);
if (par == null)
if (par == null) {
if (field.isAnnotationPresent(SkipParamCheck.class)) {
return true;
}
par = new Class[0];
}
if (parsOnField == null)
parsOnField = new Class[0];
if (par.length != parsOnField.length)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment