commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject [22/50] [lang] LANG-1317: Add MethodUtils#findAnnotation and extend MethodUtils#getMethodsWithAnnotation for non-public, super-class and interface methods
Date Wed, 17 May 2017 15:04:06 GMT
LANG-1317: Add MethodUtils#findAnnotation and extend MethodUtils#getMethodsWithAnnotation for
non-public, super-class and interface methods

fix bug introduced by last commit


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/8cafd87c
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/8cafd87c
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/8cafd87c

Branch: refs/heads/release
Commit: 8cafd87c83f4197f7e8d14de8cba453c844266c0
Parents: 314b6b5
Author: pascalschumacher <pascalschumacher@gmx.net>
Authored: Fri Apr 21 10:53:17 2017 +0200
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Fri Apr 21 10:53:17 2017 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/8cafd87c/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
index 107f317..2855410 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
@@ -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());


Mime
View raw message