Skip to content

Commit

Permalink
解决如果多个类拥有相同的方法以及方法签名和返回值的情况下,会造成方法覆盖的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
teaey committed Dec 23, 2015
1 parent ba387a9 commit b7bb994
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,9 @@ private static Class<?>[] desc2classArray(ClassLoader cl, String desc) throws Cl
*/
public static Method findMethodByMethodSignature(Class<?> clazz, String methodName, String[] parameterTypes)
throws NoSuchMethodException, ClassNotFoundException {
String signature = methodName;
String signature = clazz.getName() + ".";
if(parameterTypes != null && parameterTypes.length > 0){
signature = methodName + StringUtils.join(parameterTypes);
signature += StringUtils.join(parameterTypes);
}
Method method = Signature_METHODS_CACHE.get(signature);
if(method != null){
Expand Down

0 comments on commit b7bb994

Please sign in to comment.