sohel-79 commented on code in PR #2550:
URL: 
https://github.com/apache/incubator-eventmesh/pull/2550#discussion_r1045235564


##########
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:
   This method stores the return result in a local variable, and then 
immediately returns the local variable. It would be simpler just to return the 
value that is assigned to the local variable.
   
   Mentioned in issue #2537



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