You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/04/30 07:27:41 UTC

[GitHub] [incubator-dolphinscheduler] lenboo commented on a change in pull request #2560: process batch export and import #2501

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:
users@infra.apache.org