From: NingZhang-Ericsson Date: Fri, 13 Jul 2018 08:48:13 +0000 (+0800) Subject: Fix JASSIST-267 X-Git-Tag: rel_3_24_0_rc~13^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F210%2Fhead;p=javassist.git Fix JASSIST-267 Clean code according to comments. --- diff --git a/src/main/javassist/util/proxy/ProxyFactory.java b/src/main/javassist/util/proxy/ProxyFactory.java index da9e29c6..646bbcc4 100644 --- a/src/main/javassist/util/proxy/ProxyFactory.java +++ b/src/main/javassist/util/proxy/ProxyFactory.java @@ -1216,12 +1216,9 @@ public class ProxyFactory { private static boolean areParametersSame(Method method, Method targetMethod) { Class[] methodTypes = method.getParameterTypes(); Class[] targetMethodTypes = targetMethod.getParameterTypes(); - int i = -1; if (methodTypes.length == targetMethodTypes.length) { - for (Class clz : methodTypes) { - i++; - - if (clz.equals(targetMethodTypes[i].getClass())) { + for (int i = 0; i< methodTypes.length; i++) { + if (methodTypes[i].getName().equals(targetMethodTypes[i].getName())) { continue; } else { return false;