Skip to content

Commit 0c87ac8

Browse files
author
guohao
committed
Fix Conflicts apm-jdk-threadpool-plugin conflicts with apm-jdk-forkjoinpool-plugin
1 parent f67fe0f commit 0c87ac8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Release Notes.
66
------------------
77

88
* Add the virtual thread executor plugin
9-
9+
* Fix Conflicts apm-jdk-threadpool-plugin conflicts with apm-jdk-forkjoinpool-plugin
1010

1111
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/236?closed=1)
1212

apm-sniffer/bootstrap-plugins/jdk-threadpool-plugin/src/main/java/org/apache/skywalking/apm/plugin/AbstractThreadingPoolInterceptor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
2525
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
2626
import java.lang.reflect.Method;
27+
import java.util.concurrent.ForkJoinTask;
2728

2829
public abstract class AbstractThreadingPoolInterceptor implements InstanceMethodsAroundInterceptor {
2930
@Override
@@ -71,6 +72,8 @@ private boolean notToEnhance(Object[] allArguments) {
7172
Object argument = allArguments[0];
7273

7374
// Avoid duplicate enhancement, such as the case where it has already been enhanced by RunnableWrapper or CallableWrapper with toolkit.
74-
return argument instanceof EnhancedInstance && ((EnhancedInstance) argument).getSkyWalkingDynamicField() instanceof ContextSnapshot;
75+
return argument instanceof EnhancedInstance
76+
&& ((EnhancedInstance) argument).getSkyWalkingDynamicField() instanceof ContextSnapshot
77+
&& !(argument instanceof ForkJoinTask);
7578
}
7679
}

0 commit comments

Comments
 (0)