You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/30 07:55:35 UTC

[GitHub] [skywalking] libinglong commented on a change in pull request #6103: new future add witness method

libinglong commented on a change in pull request #6103:
URL: https://github.com/apache/skywalking/pull/6103#discussion_r550005017



##########
File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/AbstractClassEnhancePluginDefine.java
##########
@@ -70,6 +75,25 @@
                 }
             }
         }
+        List<WitnessMethod> witnessMethods = witnessMethods();
+        if (!CollectionUtil.isEmpty(witnessMethods)) {
+            for (WitnessMethod witnessMethod : witnessMethods) {
+                TypePool.Resolution resolution = WitnessClassFinder.INSTANCE.getResolution(witnessMethod.declaringClassName, classLoader);
+                if (!resolution.isResolved()) {
+                    LOGGER.warn("enhance class {} by plugin {} is not working. Because declaringClass {} of the witness method is not existed.", transformClassName, interceptorDefineClassName, witnessMethod.declaringClassName);
+                    return null;
+                }
+                boolean empty = resolution.resolve()
+                        .getDeclaredMethods()

Review comment:
       Right.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org