Fix the logic

This commit is contained in:
Laplie Anderson 2020-02-19 21:21:29 -05:00
parent 92b9c07018
commit 43487fcfb5
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}