-
Hi, I'm working on adding instrumentation support for jsonrpc4j: #13008 When instrumenting the createClientProxy method (check the instrumentation code) , I met an issue, the error log is like:
I didn't find the cause, wondering are there any restrictions on instrumenting abstract class? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Copy the body of the advice method into an util class (for example |
Beta Was this translation helpful? Give feedback.
Copy the body of the advice method into an util class (for example
JsonRpcSingletons
would work) and call that method from the advice. Byte-buddy inline advice copies the body of the advice method into the instrumented method. You should avoid doing anything too complicated in the advice method and if complicated stuff is needed do it in a helper class. The exception is basically telling you that the instrumented method can't access an anonymous inner class from the advice class (that is yourInvocationHandler
implementation).