-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dubbo - telnet] Unrecognized overload method #2766
Comments
为何调用的第一个参数值是字符串,如 |
传递13也是可以的,一样 |
`private static boolean isMatch(Class[] types, List args) {
if (types.length != args.size()) {
return false;
}
for (int i = 0; i < types.length; i++) {
Class type = types[i];
这个方法判断有问题吧 |
yes, @kexianjun Welcome to fix this bug, :-) |
我试了下,参数带L后缀不能被正确解析成Long类型的数字 |
字符串带L不能正确解析 |
another problem,if a method contains complex parameters,Such as class Student below,the invoke command can never invoke the correct method since com.alibaba.fastjson.JSON#parseArray(java.lang.String, java.lang.Class) can not parse args to correct class,in blow method to parse the args (com.alibaba.dubbo.rpc.protocol.dubbo.telnet.InvokeTelnetHandler#telnet; list = JSON.parseArray("[" + args + "]", Object.class);)
,not like the Telnet Command Reference decribed about the invoke command.So I think there is necessary to enhance the invoke command and make the argument type known to it. |
@kexianjun I merged your change. Pls. check my comments on the pull request, and consider to update doc. |
Environment
Steps to reproduce this issue
Assume that there is an interface below:
Start telnet call service:
Always only call the method
invoke(Long id, Set<String> orderNumbers)
.The text was updated successfully, but these errors were encountered: