diff --git a/src/main/java/org/apache/commons/lang3/ClassUtils.java b/src/main/java/org/apache/commons/lang3/ClassUtils.java index 9cd9ede07..4ea8457e3 100644 --- a/src/main/java/org/apache/commons/lang3/ClassUtils.java +++ b/src/main/java/org/apache/commons/lang3/ClassUtils.java @@ -1167,8 +1167,7 @@ public class ClassUtils { return declaredMethod; } - final List> candidateClasses = new ArrayList<>(); - candidateClasses.addAll(getAllInterfaces(cls)); + final List> candidateClasses = new ArrayList<>(getAllInterfaces(cls)); candidateClasses.addAll(getAllSuperclasses(cls)); for (final Class candidateClass : candidateClasses) {