ruanwenjun commented on code in PR #15677:
URL:
https://github.com/apache/dolphinscheduler/pull/15677#discussion_r1515591013
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -601,9 +601,11 @@ public void setGlobalParamIfCommanded(ProcessDefinition
processDefinition, Map<S
if (MapUtils.isNotEmpty(startParamMap) && globalMap != null) {
// start param to overwrite global param
for (Map.Entry<String, String> param : globalMap.entrySet()) {
- String val = startParamMap.get(param.getKey()).getValue();
- if (val != null) {
- param.setValue(val);
+ if (startParamMap.containsKey(param.getKey())) {
+ String val = startParamMap.get(param.getKey()).getValue();
+ if (val != null) {
+ param.setValue(val);
+ }
Review Comment:
Thanks for your PR, please add UT for this case.
--
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]