You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gossip.apache.org by "lai donglin (JIRA)" <ji...@apache.org> on 2017/01/10 08:28:58 UTC
[jira] [Created] (GOSSIP-40) Gossip member hashcode failed with
parentheses missing
lai donglin created GOSSIP-40:
---------------------------------
Summary: Gossip member hashcode failed with parentheses missing
Key: GOSSIP-40
URL: https://issues.apache.org/jira/browse/GOSSIP-40
Project: Gossip
Issue Type: Bug
Reporter: lai donglin
org.apache.gossip.GossipMember#hashCode will always return clusterName.hashCode() for a pair of parentheses missing.
here is the code:
{code:java}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
String address = getAddress();
result = prime * result + ((address == null) ? 0 : address.hashCode()) + clusterName == null ? 0
: clusterName.hashCode();
return result;
{code}
this expression {code}prime * result + ((address == null) ? 0 : address.hashCode()) + clusterName == null{code}is always false
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)