This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git
The following commit(s) were added to refs/heads/main by this push:
new 49d19464a7 Fix Conflicts apm-jdk-threadpool-plugin conflicts with
apm-jdk-forkjoinpool-plugin (#753)
49d19464a7 is described below
commit 49d19464a700b83906082982e20e9298dbc4f98b
Author: GuoHaoZai <[email protected]>
AuthorDate: Tue Apr 29 19:12:22 2025 +0800
Fix Conflicts apm-jdk-threadpool-plugin conflicts with
apm-jdk-forkjoinpool-plugin (#753)
---
CHANGES.md | 2 +-
.../skywalking/apm/plugin/AbstractThreadingPoolInterceptor.java | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 74ab4201d7..1f4fb1347f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,7 +6,7 @@ Release Notes.
------------------
* Add the virtual thread executor plugin
-
+* Fix Conflicts apm-jdk-threadpool-plugin conflicts with
apm-jdk-forkjoinpool-plugin
All issues and pull requests are
[here](https://github.com/apache/skywalking/milestone/236?closed=1)
diff --git
a/apm-sniffer/bootstrap-plugins/jdk-threadpool-plugin/src/main/java/org/apache/skywalking/apm/plugin/AbstractThreadingPoolInterceptor.java
b/apm-sniffer/bootstrap-plugins/jdk-threadpool-plugin/src/main/java/org/apache/skywalking/apm/plugin/AbstractThreadingPoolInterceptor.java
index e11c260f42..152064960b 100644
---
a/apm-sniffer/bootstrap-plugins/jdk-threadpool-plugin/src/main/java/org/apache/skywalking/apm/plugin/AbstractThreadingPoolInterceptor.java
+++
b/apm-sniffer/bootstrap-plugins/jdk-threadpool-plugin/src/main/java/org/apache/skywalking/apm/plugin/AbstractThreadingPoolInterceptor.java
@@ -24,6 +24,7 @@ import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedI
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
import java.lang.reflect.Method;
+import java.util.concurrent.ForkJoinTask;
public abstract class AbstractThreadingPoolInterceptor implements
InstanceMethodsAroundInterceptor {
@Override
@@ -71,6 +72,8 @@ public abstract class AbstractThreadingPoolInterceptor
implements InstanceMethod
Object argument = allArguments[0];
// Avoid duplicate enhancement, such as the case where it has already
been enhanced by RunnableWrapper or CallableWrapper with toolkit.
- return argument instanceof EnhancedInstance && ((EnhancedInstance)
argument).getSkyWalkingDynamicField() instanceof ContextSnapshot;
+ return argument instanceof EnhancedInstance
+ && ((EnhancedInstance) argument).getSkyWalkingDynamicField()
instanceof ContextSnapshot
+ && !(argument instanceof ForkJoinTask);
}
}