This is an automated email from the ASF dual-hosted git repository.

kerwin pushed a commit to branch 3.1.9-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/3.1.9-prepare by this push:
     new fb52207cfa [cherry-pick] Construct processInstance may NPE when master 
handling command (#14888)
fb52207cfa is described below

commit fb52207cfa7d6f290d29e7dfaaae18610f459aaa
Author: fuchanghai <[email protected]>
AuthorDate: Mon Sep 11 08:51:58 2023 +0800

    [cherry-pick] Construct processInstance may NPE when master handling 
command (#14888)
---
 .../apache/dolphinscheduler/service/process/ProcessServiceImpl.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
 
b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
index 93fc7e2490..7d4fb06ce9 100644
--- 
a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
+++ 
b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
@@ -927,6 +927,9 @@ public class ProcessServiceImpl implements ProcessService {
             throw new IllegalArgumentException("Cannot find the process 
definition for this workflowInstance");
         }
         Map<String, String> cmdParam = 
JSONUtils.toMap(command.getCommandParam());
+        if(cmdParam == null){
+            cmdParam = new HashMap<>();
+        }
         int processInstanceId = command.getProcessInstanceId();
         if (processInstanceId == 0) {
             processInstance = generateNewProcessInstance(processDefinition, 
command, cmdParam);

Reply via email to