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/09/22 03:07:04 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #12056: [Improvement][Master] Construct processInstance may NPE when master h…

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


##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -967,7 +967,7 @@ private Boolean checkCmdParam(Command command, Map<String, String> cmdParam) {
         if (processInstance.getCommandParam() != null) {
             Map<String, String> processCmdParam = JSONUtils.toMap(processInstance.getCommandParam());
             processCmdParam.forEach((key, value) -> {
-                if (!cmdParam.containsKey(key)) {
+                if (cmdParam != null && !cmdParam.containsKey(key)) {

Review Comment:
   Agree with @WangJPLeo , and then we don't need to check null everywhere.
   @tracehh Why you think the empty map is not a good idea? 



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