Avoid creating an intermediate list in the toml config
@@ -95,8 +95,7 @@ public static Config from(Path path) {
.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);
}
