aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNingZhang-Ericsson <ning.n.zhang@ericsson.com>2018-07-13 16:48:13 +0800
committerNingZhang-Ericsson <ning.n.zhang@ericsson.com>2018-07-13 16:48:13 +0800
commitb81414539807dcc96f4e578351f619f97956b92a (patch)
tree1b5d6008498a54843c4dbdef31cc45216b8baa05
parentfd1d535bb36e3d6cc2a82d19784c45f29c064cc7 (diff)
downloadjavassist-b81414539807dcc96f4e578351f619f97956b92a.tar.gz
javassist-b81414539807dcc96f4e578351f619f97956b92a.zip
Fix JASSIST-267
Clean code according to comments.
-rw-r--r--src/main/javassist/util/proxy/ProxyFactory.java7
1 files changed, 2 insertions, 5 deletions
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;