LANG-1317: Add MethodUtils#findAnnotation and extend MethodUtils#getMethodsWithAnnotation for non-public, super-class and interface methods
fix bug introduced by last commit
This commit is contained in:
parent
314b6b56be
commit
8cafd87c83
|
@ -904,7 +904,7 @@ public class MethodUtils {
|
|||
Validate.isTrue(annotationCls != null, "The annotation class must not be null");
|
||||
List<Class<?>> classes = (searchSupers ? getAllSuperclassesAndInterfaces(cls)
|
||||
: new ArrayList<Class<?>>());
|
||||
classes.add(cls);
|
||||
classes.add(0, cls);
|
||||
final List<Method> annotatedMethods = new ArrayList<>();
|
||||
for (Class<?> acls : classes) {
|
||||
final Method[] methods = (ignoreAccess ? acls.getDeclaredMethods() : acls.getMethods());
|
||||
|
|
Loading…
Reference in New Issue