You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for asking such a simple question, but I really couldn't find the relevant answer.
Below is my current code:
public class DispatcherDelegation {
public static Boolean promoteAndExecute(@This Dispatcher dispatcher){.....}
}
public class AgentMain {
void redefineDispatcher(Instrumentation instrumentation) {
byte[] newBytes = new ByteBuddy()
.redefine(Dispatcher.class)
.method(named("promoteAndExecute"))
.intercept(MethodDelegation.to(DispatcherDelegation.class))
.make()
.getBytes();
ClassDefinition classDefinition = new ClassDefinition(Dispatcher.class, newBytes);
instrumentation.redefineClasses(classDefinition);
}
}
Error is:
Caused by: java.lang.IllegalArgumentException: None of [public static java.lang.Boolean org.example.DispatcherDelegation.promoteAndExecute(...)] allows for delegation from private final boolean okhttp3.Dispatcher.promoteAndExecute()
How can I solve this problem? thank you very much! orz...
The text was updated successfully, but these errors were encountered:
Solved, from your reply I realized that it might be a problem with the method parameters, deleted the executorService below, and succeeded
public class DispatcherDelegation {
public static Boolean promoteAndExecute(@This Dispatcher dispatcher
, @FieldValue("executorService") ExecutorService executorService)
}
Sorry for asking such a simple question, but I really couldn't find the relevant answer.
Below is my current code:
Error is:
How can I solve this problem? thank you very much! orz...
The text was updated successfully, but these errors were encountered: