lenboo commented on a change in pull request #2560:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/2560#discussion_r417799074



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
##########
@@ -705,71 +716,75 @@ 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);
-        ProcessMeta processMeta = JSONUtils.parseObject(processMetaJson, 
ProcessMeta.class);
+        List<ProcessMeta> processMetaList = 
JSON.parseArray(processMetaJson,ProcessMeta.class);
 
         //check file content
-        if (null == processMeta) {
+        if (null == processMetaList || processMetaList.size() <=0) {

Review comment:
       there is a general check empty list function in CollectionUtils.

##########
File path: dolphinscheduler-dao/src/main/resources/datasource.properties
##########
@@ -19,12 +19,18 @@
 # postgre

Review comment:
       can delete the unused content here.




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