From 465753ecd0841fdda5c6a298d12623bb101aaa6d Mon Sep 17 00:00:00 2001 From: Miguel Pellicer Date: Tue, 31 Aug 2021 16:27:02 +0200 Subject: [PATCH] SAK-46143 - Worksite Setup: Order by creation date does not work --- .../main/java/org/sakaiproject/site/impl/DbSiteService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/kernel-impl/src/main/java/org/sakaiproject/site/impl/DbSiteService.java b/kernel/kernel-impl/src/main/java/org/sakaiproject/site/impl/DbSiteService.java index 123ab68f2f5d..acde623c99da 100755 --- a/kernel/kernel-impl/src/main/java/org/sakaiproject/site/impl/DbSiteService.java +++ b/kernel/kernel-impl/src/main/java/org/sakaiproject/site/impl/DbSiteService.java @@ -30,11 +30,11 @@ import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; -import java.util.TreeSet; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; @@ -1117,9 +1117,9 @@ public List getSiteIds(SelectionType type, Object ofType, String criteri log.debug("getSiteIds SQL: {}, values: {}", sql, java.util.Arrays.toString(values)); List results = sqlService().dbRead(sql, values, siteIdReader); - Set siteIds = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); + Set siteIds = new LinkedHashSet<>(); if (results != null) siteIds.addAll(results); - Set excludedSiteIds = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); + Set excludedSiteIds = new LinkedHashSet<>(); if (excludedSites != null) excludedSiteIds.addAll(excludedSites); siteIds.removeAll(excludedSiteIds); return new ArrayList<>(siteIds);