Skip to content

Commit

Permalink
Check whether the key exists when "start param to overwrite global pa…
Browse files Browse the repository at this point in the history
…ram" (apache#15676)
  • Loading branch information
wustlz committed Mar 6, 2024
1 parent d5c543f commit ca3cc5e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
// start param to create new global param if global not exist
Expand Down

0 comments on commit ca3cc5e

Please sign in to comment.