njnu-seafish commented on code in PR #17818:
URL:
https://github.com/apache/dolphinscheduler/pull/17818#discussion_r2644547265
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java:
##########
@@ -244,6 +244,13 @@ private void saveTaskTimeoutAlert(Alert alert, String
content, int alertGroupId)
public void sendTaskTimeoutAlert(WorkflowInstance workflowInstance,
TaskInstance taskInstance,
ProjectUser projectUser) {
+ assert projectUser != null;
Review Comment:
> if(projectUser == null) {
> throw IlleganArguementException("project user is null");
> }
The DS project contains a large number of assert statements—I assumed they
were recommended for use.
If we don't check in advance, a NullPointerException (NPE) will occur.
--
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]