Remove more declared method filtering for optimization
Same logic that was applied in #1169
This commit is contained in:
parent
3eecb03fe2
commit
5fe26f004b
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -349,9 +348,8 @@ public class ByteBuddyElementMatchers {
|
||||||
for (final TypeDefinition type : interfaces) {
|
for (final TypeDefinition type : interfaces) {
|
||||||
if (!checkedInterfaces.contains(type)) {
|
if (!checkedInterfaces.contains(type)) {
|
||||||
checkedInterfaces.add(type);
|
checkedInterfaces.add(type);
|
||||||
for (final MethodDescription methodDescription :
|
for (final MethodDescription methodDescription : type.getDeclaredMethods()) {
|
||||||
type.getDeclaredMethods().filter(signatureMatcher)) {
|
if (signatureMatcher.matches(methodDescription) && matcher.matches(methodDescription)) {
|
||||||
if (matcher.matches(methodDescription)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue