jbertram commented on code in PR #5780:
URL: https://github.com/apache/activemq-artemis/pull/5780#discussion_r2155420438
##########
artemis-commons/src/main/java/org/apache/activemq/artemis/json/impl/JsonValueImpl.java:
##########
@@ -103,14 +103,18 @@ public String toString() {
@Override
public boolean equals(Object obj) {
- if (obj instanceof JsonValueImpl jsonValue) {
- return rawValue.equals(jsonValue.getRawValue());
+ if (this == obj) {
+ return true;
}
- return super.equals(obj);
+ if (!(obj instanceof JsonValueImpl other)) {
+ return false;
+ }
+
+ return Objects.equals(rawValue, other.getRawValue());
}
@Override
public int hashCode() {
- return rawValue.hashCode();
+ return Objects.hash(rawValue);
Review Comment:
Fixed.
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ClusterTopologyChangeMessage_V4.java:
##########
@@ -75,7 +75,8 @@ protected String getPacketString() {
@Override
public boolean equals(Object obj) {
- if (this == obj) {
+ if (this ==
Review Comment:
Fixed.
##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/ActiveMQExceptionMessage_V2.java:
##########
@@ -83,9 +83,6 @@ public boolean equals(Object obj) {
if (!(obj instanceof ActiveMQExceptionMessage_V2 other)) {
return false;
}
- if (correlationID != other.correlationID) {
- return false;
- }
- return true;
+ return correlationID == other.correlationID && true;
Review Comment:
Fixed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact