This is an automated email from the ASF dual-hosted git repository.
kerwin pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 703d790 [Bug] [Parameter Context] The preparameter OUT is null
(#8315)
703d790 is described below
commit 703d7904159b6e839209d498af47cb4d112ae22a
Author: cheney <[email protected]>
AuthorDate: Mon Feb 14 14:25:23 2022 +0800
[Bug] [Parameter Context] The preparameter OUT is null (#8315)
* fix:param context prop value is null
---
.../org/apache/dolphinscheduler/spi/task/AbstractParameters.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/AbstractParameters.java
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/AbstractParameters.java
index 0f0c7a3..9ae1f35 100644
---
a/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/AbstractParameters.java
+++
b/dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/task/AbstractParameters.java
@@ -115,12 +115,15 @@ public abstract class AbstractParameters implements
IParameters {
return;
}
Map<String, String> taskResult = getMapByString(result);
- if (taskResult == null || taskResult.size() == 0) {
+ if (taskResult.size() == 0) {
return;
}
for (Property info : outProperty) {
- info.setValue(taskResult.get(info.getProp()));
- varPool.add(info);
+ String propValue = taskResult.get(info.getProp());
+ if (StringUtils.isNotEmpty(propValue)) {
+ info.setValue(propValue);
+ varPool.add(info);
+ }
}
}