Fix virtual thread instrumentation for jdk 21 ea versions (#10887)
This commit is contained in:
parent
136781a6e0
commit
7635afe712
|
@ -32,7 +32,8 @@ public class VirtualThreadInstrumentation implements TypeInstrumentation {
|
||||||
named("switchToCarrierThread").and(takesArguments(0)),
|
named("switchToCarrierThread").and(takesArguments(0)),
|
||||||
this.getClass().getName() + "$SwitchToCarrierAdvice");
|
this.getClass().getName() + "$SwitchToCarrierAdvice");
|
||||||
transformer.applyAdviceToMethod(
|
transformer.applyAdviceToMethod(
|
||||||
named("switchToVirtualThread").and(takesArguments(1)),
|
// takes an extra argument in jdk 21 ea versions
|
||||||
|
named("switchToVirtualThread").and(takesArguments(1).or(takesArguments(2))),
|
||||||
this.getClass().getName() + "$SwitchToVirtualAdvice");
|
this.getClass().getName() + "$SwitchToVirtualAdvice");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue