This is an automated email from the ASF dual-hosted git repository.

wenjun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 73f4846c49 [Bug][Api] Complete Data workflow remove duplicates. 
(#10850)
73f4846c49 is described below

commit 73f4846c49a95e5e84e3a6b1102c115e4a031c0a
Author: houshitao <[email protected]>
AuthorDate: Sat Jul 9 21:29:11 2022 +0800

    [Bug][Api] Complete Data workflow remove duplicates. (#10850)
    
    * [Bug][Api] Complete Data workflow remove duplicates.
    
    Co-authored-by: houshitao <[email protected]>
    Co-authored-by: kezhenxu94 <[email protected]>
---
 .../dolphinscheduler/api/service/impl/ExecutorServiceImpl.java    | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
index e8092ee9fa..d4baa59d9d 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
+++ 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
@@ -985,14 +985,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl 
implements ExecutorServ
      * @return remove duplicate date list
      */
     private String removeDuplicates(String scheduleTimeList) {
-        HashSet<String> removeDate = new HashSet<String>();
-        List<String> resultList = new ArrayList<String>();
         if (StringUtils.isNotEmpty(scheduleTimeList)) {
-            String[] dateArrays = scheduleTimeList.split(COMMA);
-            List<String> dateList = Arrays.asList(dateArrays);
-            removeDate.addAll(dateList);
-            resultList.addAll(removeDate);
-            return String.join(COMMA, resultList);
+            return 
Arrays.stream(scheduleTimeList.split(COMMA)).map(String::trim).collect(Collectors.joining(COMMA));
         }
         return null;
     }

Reply via email to