Rafael Winterhalter
Rafael Winterhalter
You need to use `with(RetransformationStrategy.RETRANSFORM)` as those classes will already be loaded when your agent is installed. Use `disableClassFormatChanges()`, too, as retransformation is not capable of all forms of transformation.
In advice, you can skip the original code. Look at: `OnMethodEnter(skipOn = ...)`. A common way of doing this is: class MyAdvice { @Advice.OnMethodEnter(skipOn = Advice.NonDefaultValue.class) static boolean onEnter(@Advice.Local Object...
The default value is null, false or 0. It means that if this default value is returned, the method is not skipped, in this case. It's also explained in the...
I assume this has to do with the module system preresolving names and not finding the new class. I would avoid auxiliary classes in such injection and rather use `Advice`...
You can creste your own annotation and bind it to a Field as you want. Check the javadoc for further details.
So you want to access if a method changes a property? I was thinking that you derive that from the method name.
Are you retransforming? If so, a class might be loaded when matching it. What does the log say? Does the missing class show up at all?
To me it seems as if `SendCashReq` is already loaded in that case. Are you logging ignored classes? Any class passed to Byte Buddy would get logged here.
Do you reference losded classes somewhere? Byte Buddy would not load it itself. Are you running premain? In this case the app should not even come up before installing the...
That's strange then. I'd activate logging of class loading on the JVM level and see if I can stitch it together based on that.