From 92a1d21b3b1cc24cf38e7d6479a8c2803ebae730 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Mon, 29 Jul 2019 22:10:43 +0200 Subject: [PATCH] Fix important parameter not used in ReflexionUtil --- src/main/java/fr/pandacube/java/util/ReflexionUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/pandacube/java/util/ReflexionUtil.java b/src/main/java/fr/pandacube/java/util/ReflexionUtil.java index a3f1286..7e22575 100644 --- a/src/main/java/fr/pandacube/java/util/ReflexionUtil.java +++ b/src/main/java/fr/pandacube/java/util/ReflexionUtil.java @@ -96,7 +96,7 @@ public class ReflexionUtil { } public static Object invokeMethod(Class clazz, Object instance, String methodName, Class[] parameterTypes, Object... args) throws ReflectiveOperationException { - Method m = clazz.getMethod(methodName); + Method m = clazz.getMethod(methodName, parameterTypes); m.setAccessible(true); return m.invoke(instance, args); } @@ -143,7 +143,7 @@ public class ReflexionUtil { } public static Object invokeDeclaredMethod(Class clazz, Object instance, String methodName, Class[] parameterTypes, Object... args) throws ReflectiveOperationException { - Method m = clazz.getDeclaredMethod(methodName); + Method m = clazz.getDeclaredMethod(methodName, parameterTypes); m.setAccessible(true); return m.invoke(instance, args); }