tabish121 commented on code in PR #5776: URL: https://github.com/apache/activemq-artemis/pull/5776#discussion_r2162599660
########## artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage_V2.java: ########## @@ -66,10 +68,7 @@ public long getCorrelationID() { @Override public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + (int) (correlationID ^ (correlationID >>> 32)); - return result; + return Objects.hash(super.hashCode(), correlationID); Review Comment: Same as previous comment regarding the super.hashCode ########## artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage.java: ########## @@ -68,10 +68,7 @@ protected String getPacketString() { @Override public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((exception == null) ? 0 : exception.hashCode()); - return result; + return Objects.hash(super.hashCode(), exception); Review Comment: This is an odd one, computing the hash of the `super.hashCode()` vs just addition of that value with the exception hash ? `super.hashCode() + Objects.hashCode(exception)` ########## artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V3.java: ########## @@ -85,10 +85,7 @@ public void decodeRest(final ActiveMQBuffer buffer) { @Override public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((scaleDownGroupName == null) ? 0 : scaleDownGroupName.hashCode()); - return result; + return Objects.hash(super.hashCode(), scaleDownGroupName); Review Comment: same as above -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact