Browse Source

Using Jackson instead of Fastjson

pull/2/head
simon824 4 years ago
parent
commit
9ada3c7aac
  1. 13
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java

13
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/ProcessDefinition.java

@ -279,10 +279,15 @@ public class ProcessDefinition {
}
public void setGlobalParams(String globalParams) {
try {
this.globalParamList = JSONUtils.getMapper().readValue(globalParams, new TypeReference<List<Property>>() {});
} catch (IOException e) {
logger.error("json parse exception!", e);
if (globalParams == null){
this.globalParamList = new ArrayList<>();
}else {
try {
this.globalParamList = JSONUtils.getMapper().readValue(globalParams, new TypeReference<List<Property>>() {
});
} catch (IOException e) {
logger.error("json parse exception!", e);
}
}
this.globalParams = globalParams;
}

Loading…
Cancel
Save