No need to qualify method in the same class

- PMD version: 7.0.0
This commit is contained in:
Gary Gregory 2024-04-25 08:29:43 -04:00
parent 0287bada77
commit 0a9033b034
1 changed files with 2 additions and 2 deletions

View File

@ -293,8 +293,8 @@ public class MethodUtils {
final Class<?> mcls = method.getDeclaringClass(); final Class<?> mcls = method.getDeclaringClass();
final List<Class<?>> classes = getAllSuperclassesAndInterfaces(mcls); final List<Class<?>> classes = getAllSuperclassesAndInterfaces(mcls);
for (final Class<?> acls : classes) { for (final Class<?> acls : classes) {
final Method equivalentMethod = ignoreAccess ? MethodUtils.getMatchingMethod(acls, method.getName(), method.getParameterTypes()) final Method equivalentMethod = ignoreAccess ? getMatchingMethod(acls, method.getName(), method.getParameterTypes())
: MethodUtils.getMatchingAccessibleMethod(acls, method.getName(), method.getParameterTypes()); : getMatchingAccessibleMethod(acls, method.getName(), method.getParameterTypes());
if (equivalentMethod != null) { if (equivalentMethod != null) {
annotation = equivalentMethod.getAnnotation(annotationCls); annotation = equivalentMethod.getAnnotation(annotationCls);
if (annotation != null) { if (annotation != null) {