gabrywu commented on a change in pull request #2872:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/2872#discussion_r435931929



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -756,8 +756,13 @@ private boolean checkTaskHasSubProcess(String taskType) {
     public Map<String, Object> importProcessDefinition(User loginUser, 
MultipartFile file, String currentProjectName) {
         Map<String, Object> result = new HashMap<>(5);
         String processMetaJson = FileUtils.file2String(file);
-        List<ProcessMeta> processMetaList = JSON.parseArray(processMetaJson, 
ProcessMeta.class);
+        List<ProcessMeta> processMetaList = new ArrayList<>();
 
+        try {
+            processMetaList = JSONUtils.getMapper().readValue(processMetaJson, 
new TypeReference<List<ProcessMeta>>() {});

Review comment:
       why not use JSONUtils.toList




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to