Fix the logic
MODIFY
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/ByteBuddyElementMatchers.java
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/ByteBuddyElementMatchers.java
@@ -119,7 +119,8 @@ public class ByteBuddyElementMatchers {
// in {@code getSuperClass} calls
TypeDefinition typeDefinition = target;
while (typeDefinition != null) {
- if ((!interfacesOnly && matcher.matches(typeDefinition.asGenericType()))
+ if (((!interfacesOnly || typeDefinition.isInterface())
+ && matcher.matches(typeDefinition.asGenericType()))
|| hasInterface(typeDefinition, checkedInterfaces)) {
return true;
}

Fix the logic