Merge pull request #1169 from DataDog/tyler/remove-filter

Optimize HasSuperMethodMatcher logic
This commit is contained in:
Tyler Benson 2020-01-13 12:11:27 -08:00 committed by GitHub
commit 603155f56f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -328,9 +328,8 @@ public class ByteBuddyElementMatchers {
final Set<TypeDefinition> checkedInterfaces = new HashSet<>(); final Set<TypeDefinition> checkedInterfaces = new HashSet<>();
while (declaringType != null) { while (declaringType != null) {
for (final MethodDescription methodDescription : for (final MethodDescription methodDescription : declaringType.getDeclaredMethods()) {
declaringType.getDeclaredMethods().filter(signatureMatcher)) { if (signatureMatcher.matches(methodDescription) && matcher.matches(methodDescription)) {
if (matcher.matches(methodDescription)) {
return true; return true;
} }
} }