Fix Conflicts apm-jdk-threadpool-plugin conflicts with apm-jdk-forkjoinpool-plugin (#753)
This commit is contained in:
parent
f67fe0f7fd
commit
49d19464a7
|
|
@ -6,7 +6,7 @@ Release Notes.
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
* Add the virtual thread executor plugin
|
* 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)
|
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/236?closed=1)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.InstanceMethodsAroundInterceptor;
|
||||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.concurrent.ForkJoinTask;
|
||||||
|
|
||||||
public abstract class AbstractThreadingPoolInterceptor implements InstanceMethodsAroundInterceptor {
|
public abstract class AbstractThreadingPoolInterceptor implements InstanceMethodsAroundInterceptor {
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -71,6 +72,8 @@ public abstract class AbstractThreadingPoolInterceptor implements InstanceMethod
|
||||||
Object argument = allArguments[0];
|
Object argument = allArguments[0];
|
||||||
|
|
||||||
// Avoid duplicate enhancement, such as the case where it has already been enhanced by RunnableWrapper or CallableWrapper with toolkit.
|
// 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue