You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by we...@apache.org on 2022/07/09 17:31:53 UTC

[dolphinscheduler] branch dev updated: [Bug][Api] Complete Data workflow remove duplicates. (#10868)

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 cc41485d50 [Bug][Api] Complete Data workflow remove duplicates. (#10868)
cc41485d50 is described below

commit cc41485d503ef79f0378df4731e3f7f7c983ce8c
Author: houshitao <33...@users.noreply.github.com>
AuthorDate: Sun Jul 10 01:31:44 2022 +0800

    [Bug][Api] Complete Data workflow remove duplicates. (#10868)
    
    Co-authored-by: houshitao <sh...@163.com>
---
 .../apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 d4baa59d9d..2bdd7eb6f4 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
@@ -986,7 +986,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
      */
     private String removeDuplicates(String scheduleTimeList) {
         if (StringUtils.isNotEmpty(scheduleTimeList)) {
-            return Arrays.stream(scheduleTimeList.split(COMMA)).map(String::trim).collect(Collectors.joining(COMMA));
+            Set<String> dateSet  = Arrays.stream(scheduleTimeList.split(COMMA)).map(String::trim).collect(Collectors.toSet());
+            return String.join(COMMA, dateSet);
         }
         return null;
     }