-
Notifications
You must be signed in to change notification settings - Fork 963
Closed
Description
When BTrace is using invoke dynamic (indy) (instead of generating private static handler method which is frowned upon in JDK 14 and forbidden in JDK 15) the cushion methods (empty-bodied handler methods corresponding to removed probes) do not play nice with the Indy and cause the following error:
java.lang.UnsupportedOperationException: class redefinition failed: attempted to add a method
at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:167)
at org.openjdk.btrace.agent.Client.retransformLoaded(Client.java:500)
at org.openjdk.btrace.agent.Main$5.run(Main.java:878)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)