Skip to content

Commit

Permalink
Fix virtual thread instrumentation for jdk 21 ea versions (#10887)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit committed Mar 19, 2024
1 parent 136781a commit 7635afe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public void transform(TypeTransformer transformer) {
named("switchToCarrierThread").and(takesArguments(0)),
this.getClass().getName() + "$SwitchToCarrierAdvice");
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");
}

Expand Down

0 comments on commit 7635afe

Please sign in to comment.