wu-sheng commented on a change in pull request #6103:
URL: https://github.com/apache/skywalking/pull/6103#discussion_r550082113
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/WitnessFinder.java
##########
@@ -46,9 +57,24 @@ public boolean exist(String witnessClass, ClassLoader
classLoader) {
}
}
TypePool typePool = poolMap.get(mappingKey);
- TypePool.Resolution witnessClassResolution =
typePool.describe(witnessClass);
- return witnessClassResolution.isResolved();
+ return typePool.describe(witnessClass);
+ }
+
+ /**
+ * @param classLoader for finding the witness method
+ * @return true, if the given witness method exists, through the given
classLoader.
+ */
+ public boolean exist(WitnessMethod witnessMethod, ClassLoader classLoader)
{
+ TypePool.Resolution resolution =
WitnessFinder.INSTANCE.getResolution(witnessMethod.getDeclaringClassName(),
classLoader);
Review comment:
```suggestion
TypePool.Resolution resolution =
this.getResolution(witnessMethod.getDeclaringClassName(), classLoader);
```
----------------------------------------------------------------
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:
[email protected]