raphw / byte-buddy

Runtime code generation for the Java virtual machine.
https://bytebuddy.net
Apache License 2.0
6.29k stars 807 forks source link

java.lang.IllegalArgumentException #1532

Closed JimmyAndZzZ closed 1 month ago

JimmyAndZzZ commented 1 year ago

hi i want to enhance class ,when i hope proxy any method,it will report a error

java.lang.IllegalArgumentException: None of [protected void java.lang.Object.finalize() throws java.lang.Throwable, public final void java.lang.Object.wait() throws java.lang.InterruptedException, public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException, public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException, public boolean java.lang.Object.equals(java.lang.Object), public java.lang.String java.lang.Object.toString(), public native int java.lang.Object.hashCode(), public final native java.lang.Class java.lang.Object.getClass(), protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException, public final native void java.lang.Object.notify(), public final native void java.lang.Object.notifyAll(), public java.lang.Object com.agent.bytebuddy.MethodAdviceInterceptor.intercept(java.lang.Object,java.lang.reflect.Method,java.util.concurrent.Callable,java.lang.Object[]) throws java.lang.Exception] allows for delegation from public abstract com.agent.core.EnhancedField com.agent.bytebuddy.EnhancedInstance.getDynamicField()

raphw commented 1 year ago

Can you show your interceptor class?