[ https://issues.apache.org/jira/browse/GOSSIP-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15815198#comment-15815198 ]
Edward Capriolo commented on GOSSIP-40: --------------------------------------- [~goby] Thank you for your debugging. Please allow us (gossip committers) to close the issue after we have merged it. Can you please provide some simple unit test to prevent regressions? > 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)