DarkAssassinator commented on code in PR #11722:
URL: https://github.com/apache/dolphinscheduler/pull/11722#discussion_r960642601


##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/AlertGroup.java:
##########
@@ -129,22 +130,14 @@ public boolean equals(Object o) {
 
         AlertGroup that = (AlertGroup) o;
 
-        if (id != that.id) {
-            return false;
-        }
-        if (createUserId != that.createUserId) {
-            return false;
-        }
-        if (groupName != null ? !groupName.equals(that.groupName) : 
that.groupName != null) {
-            return false;
-        }
-        if (alertInstanceIds != null ? 
!alertInstanceIds.equals(that.alertInstanceIds) : that.alertInstanceIds != 
null) {
-            return false;
-        }
-        if (description != null ? !description.equals(that.description) : 
that.description != null) {
-            return false;
-        }
-        return !(createTime != null ? !createTime.equals(that.createTime) : 
that.createTime != null) && !(updateTime != null ? 
!updateTime.equals(that.updateTime) : that.updateTime != null);

Review Comment:
   becuase Objects.equals can avoid NPE checked. and the types of all fields 
are fixed, there will be Long.equals(Integer). so i think that use the 
Objects.equals. 



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

Reply via email to