Skip to content

Commit

Permalink
removed method from 1.8 on
Browse files Browse the repository at this point in the history
  • Loading branch information
n9Mtq4 committed Jun 25, 2015
1 parent 9a6dba8 commit c91dd5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/com/n9mtq4/reflection/ReflectionHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2523,14 +2523,14 @@ public static Method getAllDeclaredMethod(String name, Class[] params, Class cla
}

// if there is only one possible method
if (possibleMethods.size() == 1 && possibleMethods.get(0).getParameterCount() == params.length) {
if (possibleMethods.size() == 1 && possibleMethods.get(0).getParameterTypes().length == params.length) {
return possibleMethods.get(0);
}

// if there are more than one, try to isolate by number of params
ArrayList<Method> nPossibleMethods = new ArrayList<Method>();
for (Method method : possibleMethods) {
if (method.getParameterCount() == params.length) nPossibleMethods.add(method);
if (method.getParameterTypes().length == params.length) nPossibleMethods.add(method);
}
possibleMethods = nPossibleMethods;
if (possibleMethods.size() == 1) return possibleMethods.get(0);
Expand Down

0 comments on commit c91dd5f

Please sign in to comment.