You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "xingguang2013 (GitHub)" <gi...@apache.org> on 2019/09/17 10:57:24 UTC

[GitHub] [dubbo] xingguang2013 opened issue #5077: Some coding problems

- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: 2.7.3
* Operating System version: Mac
* Java version: 1.8

### Steps to reproduce this issue

1.  `org/apache/dubbo/registry/support/ProviderConsumerRegTable.java:65` Type 'ProviderInvokerWrapper<>' does not define hashCode(), but is used in a hashing data-structure.
2. Class overrides equals but not hashCode.
* org.apache.dubbo.config.AbstractConfig
* org.apache.dubbo.registry.support.ProviderInvokerWrapper
* org.apache.dubbo.remoting.buffer.AbstractChannelBuffer

Pls. provide [GitHub address] to reproduce this issue.

### Expected Result

Whether the above suggestions can be fixed or have other considerations

### Actual Result

Is it considered a bug? Will it fix?


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


[GitHub] [dubbo] LiosWong commented on issue #5077: Some coding problems

Posted by "LiosWong (GitHub)" <gi...@apache.org>.
I think it's best to override the hashcode method, in some cases, it will go wrong if you don't rewrite it.


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


[GitHub] [dubbo] chickenlj commented on issue #5077: Some coding problems

Posted by "chickenlj (GitHub)" <gi...@apache.org>.
Merged.

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


[GitHub] [dubbo] xingguang2013 commented on issue #5077: Some coding problems

Posted by "xingguang2013 (GitHub)" <gi...@apache.org>.
@LiosWong , I agree.  Is this problem solved by no one or not at all ?

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