Browse Source

[Bug][Api] Complete Data workflow remove duplicates. (#10868)

Co-authored-by: houshitao <shitaohou@163.com>
3.1.0-release
houshitao 2 years ago committed by GitHub
parent
commit
cc41485d50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java

3
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;
}

Loading…
Cancel
Save