Skip to content

Commit

Permalink
[grid] TomlConfig returns sorted config details
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Aug 27, 2021
1 parent 8905eb2 commit 586affe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions java/src/org/openqa/selenium/grid/config/TomlConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

public class TomlConfig implements Config {

Expand Down Expand Up @@ -94,6 +95,8 @@ public Optional<List<String>> getAll(String section, String option) {
.map(item -> (TomlTable)item)
.forEach(tomlTable -> tomlTable.toMap().entrySet().stream()
.map(entry -> String.format("%s=%s", entry.getKey(), entry.getValue()))
.collect(Collectors.toList())
.stream().sorted()
.forEach(toReturn::add));
return Optional.of(toReturn);
}
Expand Down

0 comments on commit 586affe

Please sign in to comment.