Skip to content

Commit f0aa6eb

Browse files
committed
Merge pull request #28949 from izeye
* pr/28949: Polish "Add missing TreeSet to CollectionFactory.createCollection()" Add missing TreeSet to CollectionFactory.createCollection() Closes gh-28949
2 parents 22029b4 + 6806aaf commit f0aa6eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-core/src/main/java/org/springframework/core/CollectionFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ else if (ArrayList.class == collectionType || List.class == collectionType) {
191191
else if (LinkedList.class == collectionType) {
192192
return new LinkedList<>();
193193
}
194-
else if (SortedSet.class == collectionType || NavigableSet.class == collectionType) {
194+
else if (TreeSet.class == collectionType || NavigableSet.class == collectionType
195+
|| SortedSet.class == collectionType) {
195196
return new TreeSet<>();
196197
}
197198
else if (EnumSet.class.isAssignableFrom(collectionType)) {

0 commit comments

Comments
 (0)