From c91dd5faf137e9e5efb7ac8c9447bdf15d9471a1 Mon Sep 17 00:00:00 2001 From: n9Mtq4 Date: Wed, 24 Jun 2015 23:18:31 -0400 Subject: [PATCH] removed method from 1.8 on --- src/com/n9mtq4/reflection/ReflectionHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/n9mtq4/reflection/ReflectionHelper.java b/src/com/n9mtq4/reflection/ReflectionHelper.java index 91e8836..34f2cf4 100644 --- a/src/com/n9mtq4/reflection/ReflectionHelper.java +++ b/src/com/n9mtq4/reflection/ReflectionHelper.java @@ -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 nPossibleMethods = new ArrayList(); 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);