diff --git a/CHANGES.md b/CHANGES.md index 321c775094..0be603455f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,7 @@ Release Notes. * Support for showing batch command details and ignoring PING commands in Redisson plugin. * Fix peer value of Master-Slave mode in Redisson plugin. * Support for tracing the callbacks of asynchronous methods in elasticsearch-6.x-plugin/elasticsearch-7.x-plugin. +* Fixed the invalid issue in the isInterface method in PluginFinder. All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/213?closed=1) diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/PluginFinder.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/PluginFinder.java index 4ef608dccc..5a7404e729 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/PluginFinder.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/plugin/PluginFinder.java @@ -95,13 +95,14 @@ public boolean matches(NamedElement target) { return nameMatchDefine.containsKey(target.getActualName()); } }; - judge = judge.and(not(isInterface())); for (AbstractClassEnhancePluginDefine define : signatureMatchDefine) { ClassMatch match = define.enhanceClass(); if (match instanceof IndirectMatch) { judge = judge.or(((IndirectMatch) match).buildJunction()); } } + // Filter out all matchers returns to exclude pure interface types. + judge = not(isInterface()).and(judge); return new ProtectiveShieldMatcher(judge); }