You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/07/20 08:17:03 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #11033: [fix-10961][alert server]Change the content of alert to an array

caishunfeng commented on code in PR #11033:
URL: https://github.com/apache/dolphinscheduler/pull/11033#discussion_r925312738


##########
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertSenderService.java:
##########
@@ -93,6 +97,13 @@ public void send(List<Alert> alerts) {
                 continue;
             }
             AlertData alertData = new AlertData();
+            if (Objects.nonNull(alert.getContent())
+                    && !alert.getContent().startsWith("[")

Review Comment:
   It's better to check by `jsonNodes instanceof JSONArray`. WDYT?



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org