You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "kexianjun (GitHub)" <gi...@apache.org> on 2019/01/11 16:15:29 UTC

[GitHub] [incubator-dubbo] kexianjun commented on issue #3210: Refactor telnet invoke command

考虑如下场景:
```
interface interfaceName{
        String methodA(String msg);
        String methodA(MyEnum myEnum);
}
```
```
enum MyEnum{
        LAG;
}
```
使用如下telnet调用:
> invoke interfaceName.methodA("LAG")

应该调用哪个方法,如果没有重载方法的时候,这个调用对String类型的参数以及枚举类型的参数都是可以正常工作的.所以我觉得完全移除-p不太合理的,因为目前-p对于json以及非json,重载方法非重载方法都是可以正常工作的.而且完全移除-p以后像上面的场景就没有地方指定参数类型了.使用-p的时候其实是不用关心是不是重载方法的,只要指定具体的参数类型就可以了.class属性确实可以加上来和2.5.x的telnet调用一样,也符合原来用户的习惯,-p属于新加的可能很多用户不知道,是不是class属性和-p可以共存呢?


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3210 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org