This is an automated email from the ASF dual-hosted git repository.
crazyhzm pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new 81f240e fix getMethodName (#9082)
81f240e is described below
commit 81f240ee23cffd6e7fb8dc0cbd0b13fd767d32c3
Author: huazhongming <[email protected]>
AuthorDate: Thu Oct 21 23:18:18 2021 +0800
fix getMethodName (#9082)
---
.../java/org/apache/dubbo/common/compiler/support/ClassUtils.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java
b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java
index ee276e9..01e7af4 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java
@@ -344,9 +344,9 @@ public class ClassUtils {
}
public static String getMethodName(Method method, Class<?>[]
parameterClasses, String rightCode) {
+ StringBuilder buf = new StringBuilder(rightCode);
if (method.getParameterTypes().length > parameterClasses.length) {
Class<?>[] types = method.getParameterTypes();
- StringBuilder buf = new StringBuilder(rightCode);
for (int i = parameterClasses.length; i < types.length; i++) {
if (buf.length() > 0) {
buf.append(',');
@@ -370,7 +370,7 @@ public class ClassUtils {
buf.append(def);
}
}
- return method.getName() + "(" + rightCode + ")";
+ return method.getName() + "(" + buf + ")";
}
public static Method searchMethod(Class<?> currentClass, String name,
Class<?>[] parameterTypes) throws NoSuchMethodException {