You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "gudegg (GitHub)" <gi...@apache.org> on 2019/01/09 09:11:16 UTC
[GitHub] [incubator-dubbo] gudegg opened issue #3177: telnet cannot
call the correct overload method
- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: master branch
* Operating System version: Mac os
* Java version: 1.8
### Steps to reproduce this issue
`org.apache.dubbo.rpc.protocol.dubbo.support.DemoService` add method
```java
String getPerson(Yee yee);
```
`org.apache.dubbo.rpc.protocol.dubbo.support.DemoServiceImpl`
```java
@Override
public String getPerson(Yee yee) {
return yee.getAddress();
}
```
```java
public class Yee implements Serializable {
private String address;
}
public class Man implements Serializable {
private static final long serialVersionUID = 1L;
private String name;
private int age;
}
```
`org.apache.dubbo.rpc.protocol.dubbo.support.DemoServiceImpl` add UT
```java
@Test
public void testInvokeMultiJsonParamMethod2() throws RemotingException {
mockChannel = mock(Channel.class);
given(mockChannel.getAttribute("telnet.service")).willReturn(null);
given(mockChannel.getLocalAddress()).willReturn(NetUtils.toAddress("127.0.0.1:5555"));
given(mockChannel.getRemoteAddress()).willReturn(NetUtils.toAddress("127.0.0.1:20886"));
ProviderModel providerModel = new ProviderModel("org.apache.dubbo.rpc.protocol.dubbo.support.DemoService", new DemoServiceImpl(), DemoService.class);
ApplicationModel.initProviderModel("org.apache.dubbo.rpc.protocol.dubbo.support.DemoService", providerModel);
String param = "{\"address\":\"Dubbo\"}";
String result = invoke.telnet(mockChannel, "getPerson(" + param + ")");
assertTrue(result.contains("result: \"Dubbo"));
}
```
1. UT fail,Find the wrong overload method
### Expected Result
Call `getPerson(Yee yee)`
### Actual Result
Call `getPerson(Man man)`
### Suggestion
If the overload method parameters are different in length, allowed to not pass `class` parameter, otherwise prompted user must pass the `class` parameter.
@beiwei30
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh commented on issue #3177: telnet
cannot call the correct overload method
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
这个issue是已知的,对于重载的支持不好。但是我忘记具体的issue是在哪里了。yiji提交过类似的issue。
@zonghaishang
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] beiwei30 closed issue #3177: telnet cannot
call the correct overload method
Posted by "beiwei30 (GitHub)" <gi...@apache.org>.
[ issue closed by beiwei30 ]
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh commented on issue #3177: telnet
cannot call the correct overload method
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
> 先不要关掉吧,这个问题主要是针对我的一个pr,感觉还有优化的地方。
@LiZhenNet 好的。
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] tswstarplanet commented on issue #3177:
telnet cannot call the correct overload method
Posted by "tswstarplanet (GitHub)" <gi...@apache.org>.
I find that it is not an easy thing that support telnet perfectly.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] CrazyHZM commented on issue #3177: telnet
cannot call the correct overload method
Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
> 先不要关掉吧,这个问题主要是针对我的一个pr,感觉还有优化的地方。
关于哪个pr
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh commented on issue #3177: telnet
cannot call the correct overload method
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
这个issue是已知的,对于重载的支持不好。但是我忘记具体的issue是在哪里了。yiji提交过类似的issue。
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] kexianjun commented on issue #3177: telnet
cannot call the correct overload method
Posted by "kexianjun (GitHub)" <gi...@apache.org>.
In this case, maybe specific parameter types is needed.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] LiZhenNet commented on issue #3177: telnet
cannot call the correct overload method
Posted by "LiZhenNet (GitHub)" <gi...@apache.org>.
> 找到了:
> #2766
>
> @gudegg
> 你可以看下,如果反应的是同一个问题,这个issue就先关掉吧。
先不要关掉吧,这个问题主要是针对我的一个pr,感觉还有优化的地方。
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh commented on issue #3177: telnet
cannot call the correct overload method
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
找到了:
https://github.com/apache/incubator-dubbo/issues/2766
@gudegg
你可以看下,如果反应的是同一个问题,这个issue就先关掉吧。
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3177 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org