walterlife commented on code in PR #2550:
URL: 
https://github.com/apache/incubator-eventmesh/pull/2550#discussion_r1045189645


##########
eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/tcp/UserAgent.java:
##########
@@ -136,18 +136,17 @@ public boolean equals(Object o) {
     @Override
     public int hashCode() {
         int result = subsystem != null ? subsystem.hashCode() : 0;
-        result = 31 * result + (group != null ? group.hashCode() : 0);
-        result = 31 * result + (path != null ? path.hashCode() : 0);
-        result = 31 * result + pid;
-        result = 31 * result + (host != null ? host.hashCode() : 0);
-        result = 31 * result + (purpose != null ? purpose.hashCode() : 0);
-        result = 31 * result + port;
-        result = 31 * result + (version != null ? version.hashCode() : 0);
-        result = 31 * result + (username != null ? username.hashCode() : 0);
-        result = 31 * result + (password != null ? password.hashCode() : 0);
-        result = 31 * result + (idc != null ? idc.hashCode() : 0);
-        result = 31 * result + (env != null ? env.hashCode() : 0);
-        result = 31 * result + unack;
-        return result;
+        return (((((((((((result * 31 + (group != null ? group.hashCode() : 0))

Review Comment:
   I don't think this way of writing is more readable now.
   For example, there are too many parentheses, also not testable.



-- 
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]

Reply via email to