mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-09 11:34:55 +00:00
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 static List<Method> getMethodsListWithAnnotation(final Class<?> cls,
|
||||
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…
x
Reference in New Issue
Block a user