From ccec75c98daa681727f510fa8e69d9651615d59c Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 11 Aug 2022 00:08:58 +0900 Subject: [PATCH] Add missing TreeSet to CollectionFactory.createCollection() See gh-28949 --- .../main/java/org/springframework/core/CollectionFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/CollectionFactory.java b/spring-core/src/main/java/org/springframework/core/CollectionFactory.java index 15e3ee77538..5a2bb2bb45a 100644 --- a/spring-core/src/main/java/org/springframework/core/CollectionFactory.java +++ b/spring-core/src/main/java/org/springframework/core/CollectionFactory.java @@ -191,7 +191,7 @@ public final class CollectionFactory { else if (LinkedList.class == collectionType) { return new LinkedList<>(); } - else if (SortedSet.class == collectionType || NavigableSet.class == collectionType) { + else if (TreeSet.class == collectionType || SortedSet.class == collectionType || NavigableSet.class == collectionType) { return new TreeSet<>(); } else if (EnumSet.class.isAssignableFrom(collectionType)) {