Skip to content

Commit f247a21

Browse files
committed
Avoid creating an intermediate list in the toml config
1 parent b87e592 commit f247a21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

java/src/org/openqa/selenium/grid/config/TomlConfig.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ public Optional<List<String>> getAll(String section, String option) {
9595
.map(item -> (TomlTable)item)
9696
.forEach(tomlTable -> tomlTable.toMap().entrySet().stream()
9797
.map(entry -> String.format("%s=%s", entry.getKey(), entry.getValue()))
98-
.collect(Collectors.toList())
99-
.stream().sorted()
98+
.sorted()
10099
.forEach(toReturn::add));
101100
return Optional.of(toReturn);
102101
}

0 commit comments

Comments
 (0)