You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by wu...@apache.org on 2018/07/18 02:19:39 UTC

[incubator-skywalking] branch master updated: Fix #1454: fix NPE issue about spring apo interceptor (#1467)

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 630e623  Fix #1454: fix NPE issue about spring apo interceptor (#1467)
630e623 is described below

commit 630e62312ce1dc37d60780351d15f68ff47dd5f0
Author: Xin,Zhang <zh...@apache.org>
AuthorDate: Wed Jul 18 10:19:35 2018 +0800

    Fix #1454: fix NPE issue about spring apo interceptor (#1467)
---
 .../skywalking/apm/plugin/spring/patch/CreateAopProxyInterceptor.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/core-patch/src/main/java/org/apache/skywalking/apm/plugin/spring/patch/CreateAopProxyInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/core-patch/src/main/java/org/apache/skywalking/apm/plugin/spring/patch/CreateAopProxyInterceptor.java
index 2186bc1..a7300e4 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/core-patch/src/main/java/org/apache/skywalking/apm/plugin/spring/patch/CreateAopProxyInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/core-patch/src/main/java/org/apache/skywalking/apm/plugin/spring/patch/CreateAopProxyInterceptor.java
@@ -44,7 +44,8 @@ public class CreateAopProxyInterceptor implements InstanceMethodsAroundIntercept
         Object ret) throws Throwable {
         AdvisedSupport advisedSupport = (AdvisedSupport)allArguments[0];
 
-        if (EnhancedInstance.class.isAssignableFrom(advisedSupport.getTargetClass())) {
+        Class targetClass = advisedSupport.getTargetClass();
+        if (targetClass != null && EnhancedInstance.class.isAssignableFrom(targetClass)) {
             return true;
         }
         return ret;