tabish121 commented on code in PR #5776: URL: https://github.com/apache/activemq-artemis/pull/5776#discussion_r2152713302
########## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/SimpleTest.java: ########## @@ -86,6 +87,10 @@ public void setUp() throws Exception { @Test public void simpleTest() throws Exception { + Integer x = Integer.valueOf(5); Review Comment: Feels like forgotten debugging code ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/config/amqpBrokerConnectivity/AMQPBridgeAddressPolicyElement.java: ########## @@ -286,7 +287,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(addressMatch, addressMatch); + return Objects.hash(addressMatch); Review Comment: I think this could be Object.hashCode since it is a single value and doesn't need to use the array based variant ? ########## artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/RecordInfo.java: ########## @@ -67,7 +69,7 @@ public byte getUserRecordType() { @Override public int hashCode() { - return (int) (id >>> 32 ^ id); + return Objects.hash(id); Review Comment: I think this could be Object.hashCode since it is a single value and doesn't need to use the array based variant ? ########## tests/artemis-test-support/src/main/java/org/apache/activemq/transport/amqp/client/AmqpTransactionId.java: ########## @@ -65,10 +67,7 @@ public void setRemoteTxId(Binary remoteTxId) { @Override public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((txId == null) ? 0 : txId.hashCode()); - return result; + return Objects.hash(txId); Review Comment: I think this could be Object.hashCode since it is a single value and doesn't need to use the array based variant ? ########## artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/Match.java: ########## @@ -109,7 +110,7 @@ public boolean equals(final Object o) { @Override public int hashCode() { - return match != null ? match.hashCode() : 0; + return Objects.hash(match); Review Comment: I think this could be Object.hashCode since it is a single value and doesn't need to use the array based variant ? ########## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/ReSendMessageTest.java: ########## @@ -185,10 +186,7 @@ public static class SomeSerializable implements Serializable { @Override public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (txt == null ? 0 : txt.hashCode()); - return result; + return Objects.hash(txt); Review Comment: I think this could be Object.hashCode since it is a single value and doesn't need to use the array based variant ? -- 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