Skip to content

Commit

Permalink
Avoid creating an intermediate list in the toml config
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Aug 30, 2021
1 parent b87e592 commit f247a21
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions java/src/org/openqa/selenium/grid/config/TomlConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ 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()
.sorted()
.forEach(toReturn::add));
return Optional.of(toReturn);
}
Expand Down

1 comment on commit f247a21

@diemol
Copy link
Member

@diemol diemol commented on f247a21 Aug 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Please sign in to comment.