This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git
The following commit(s) were added to refs/heads/master by this push: new 745e104 Fix ClassCastException (#2125) 745e104 is described below commit 745e1043ffa414ebe4e60c96aeb58ef62ab541e6 Author: Xin,Zhang <zhang...@apache.org> AuthorDate: Sun Jan 6 17:21:53 2019 +0800 Fix ClassCastException (#2125) --- .../apm/plugin/hystrix/v1/SWExecutionHookWrapper.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/SWExecutionHookWrapper.java b/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/SWExecutionHookWrapper.java index fbe0022..fe7cb3c 100644 --- a/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/SWExecutionHookWrapper.java +++ b/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/SWExecutionHookWrapper.java @@ -39,6 +39,11 @@ public class SWExecutionHookWrapper extends HystrixCommandExecutionHook { @Override public <T> void onStart(HystrixInvokable<T> commandInstance) { + if (!(commandInstance instanceof EnhancedInstance)) { + actual.onStart(commandInstance); + return; + } + EnhancedInstance enhancedInstance = (EnhancedInstance)commandInstance; EnhanceRequireObjectCache enhanceRequireObjectCache = (EnhanceRequireObjectCache)enhancedInstance.getSkyWalkingDynamicField(); if (ContextManager.isActive()) { @@ -166,6 +171,11 @@ public class SWExecutionHookWrapper extends HystrixCommandExecutionHook { } @Override public <T> void onStart(HystrixCommand<T> commandInstance) { + if (!(commandInstance instanceof EnhancedInstance)) { + actual.onStart(commandInstance); + return; + } + EnhancedInstance enhancedInstance = (EnhancedInstance)commandInstance; EnhanceRequireObjectCache enhanceRequireObjectCache = (EnhanceRequireObjectCache)enhancedInstance.getSkyWalkingDynamicField(); if (ContextManager.isActive()) {