File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
java/src/org/openqa/selenium/grid/config Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1818package org .openqa .selenium .grid .config ;
1919
2020import java .util .Collection ;
21+ import java .util .Collections ;
22+ import java .util .Comparator ;
2123import java .util .List ;
2224import java .util .Optional ;
2325import java .util .Set ;
@@ -58,7 +60,10 @@ public Set<String> getSectionNames() {
5860 return allConfigs .stream ()
5961 .map (Config ::getSectionNames )
6062 .flatMap (Collection ::stream )
61- .collect (Collectors .toCollection (TreeSet ::new ));
63+ .collect (Collectors .collectingAndThen (
64+ Collectors .toCollection (TreeSet ::new ),
65+ Collections ::unmodifiableSortedSet
66+ ));
6267 }
6368
6469 @ Override
@@ -68,6 +73,9 @@ public Set<String> getOptions(String section) {
6873 return allConfigs .stream ()
6974 .map (config -> config .getOptions (section ))
7075 .flatMap (Collection ::stream )
71- .collect (Collectors .toCollection (TreeSet ::new ));
76+ .collect (Collectors .collectingAndThen (
77+ Collectors .toCollection (TreeSet ::new ),
78+ Collections ::unmodifiableSortedSet
79+ ));
7280 }
7381}
You can’t perform that action at this time.
0 commit comments