You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gossip.apache.org by "Edward Capriolo (JIRA)" <ji...@apache.org> on 2017/01/10 15:01:58 UTC
[jira] [Reopened] (GOSSIP-40) Gossip member hashcode failed with
parentheses missing
[ https://issues.apache.org/jira/browse/GOSSIP-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Edward Capriolo reopened GOSSIP-40:
-----------------------------------
> 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)