From f561057311d6410cb9c03533867a44a59112508f Mon Sep 17 00:00:00 2001 From: Dan Mulloy Date: Sat, 19 Mar 2016 22:36:25 -0400 Subject: [PATCH] Fix an error with TinyProtocol reflection Fixes aadnk#103 --- .../src/main/java/com/comphenix/tinyprotocol/Reflection.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/TinyProtocol/src/main/java/com/comphenix/tinyprotocol/Reflection.java b/modules/TinyProtocol/src/main/java/com/comphenix/tinyprotocol/Reflection.java index 73bf8a97..d08980fe 100644 --- a/modules/TinyProtocol/src/main/java/com/comphenix/tinyprotocol/Reflection.java +++ b/modules/TinyProtocol/src/main/java/com/comphenix/tinyprotocol/Reflection.java @@ -215,7 +215,9 @@ public final class Reflection { */ public static MethodInvoker getTypedMethod(Class clazz, String methodName, Class returnType, Class... params) { for (final Method method : clazz.getDeclaredMethods()) { - if ((methodName == null || method.getName().equals(methodName)) && (returnType == null) || method.getReturnType().equals(returnType) && Arrays.equals(method.getParameterTypes(), params)) { + if ((methodName == null || method.getName().equals(methodName)) + && (returnType == null || method.getReturnType().equals(returnType)) + && Arrays.equals(method.getParameterTypes(), params)) { method.setAccessible(true); return new MethodInvoker() {