From 8cabb7a907f408d46b442e9f2635d6e97454aac3 Mon Sep 17 00:00:00 2001 From: simon824 Date: Tue, 9 Jun 2020 14:15:13 +0800 Subject: [PATCH] 1. specified jackson Date format. 2. remove getMapper method,replace with toList() 3. rewrite toList method,support constructCollectionType. 4. parseObject(resp, Map.class) replace to toMap() method 5. rename JacksonSerialize to JsonSerializer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rewrite createArrayNode,createObjectNode method will Affect too many lines ,i will fix it in the next pr. --- .../org/apache/dolphinscheduler/common/utils/JSONUtils.java | 4 ++-- .../dolphinscheduler/server/worker/task/datax/DataxTask.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java index 63611cc7d6..c78ceb2d5c 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/JSONUtils.java @@ -187,7 +187,7 @@ public class JSONUtils { */ public static Map toMap(String json) { if (StringUtils.isEmpty(json)) { - return new HashMap<>(); + return null; } try { @@ -196,7 +196,7 @@ public class JSONUtils { logger.error("json to map exception!", e); } - return new HashMap<>(); + return null; } /** diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/datax/DataxTask.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/datax/DataxTask.java index 723ded4f2f..4939456ce0 100755 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/datax/DataxTask.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/datax/DataxTask.java @@ -277,7 +277,6 @@ public class DataxTask extends AbstractTask { dataSourceCfg, dataXParameters.getSql()); ArrayNode columnArr = writerParam.putArray("column"); - columnArr.addAll() for (String column : columns) { columnArr.add(column); }