Polish contribution

See gh-30271
This commit is contained in:
Sam Brannen 2023-04-03 16:45:42 +02:00
parent 7fcbc869a6
commit 02f2d94f57
1 changed files with 4 additions and 4 deletions

View File

@ -341,10 +341,10 @@ public class SpringFactoriesLoader {
UrlResource resource = new UrlResource(urls.nextElement());
Properties properties = PropertiesLoaderUtils.loadProperties(resource);
properties.forEach((name, value) -> {
String[] factoryImplementationNames= StringUtils.commaDelimitedListToStringArray((String) value);
List<String> implementations = result.computeIfAbsent(((String) name).trim(), key -> new ArrayList<>(factoryImplementationNames.length));
Arrays.stream(factoryImplementationNames)
.map(String::trim).forEach(implementations::add);
String[] factoryImplementationNames = StringUtils.commaDelimitedListToStringArray((String) value);
List<String> implementations = result.computeIfAbsent(((String) name).trim(),
key -> new ArrayList<>(factoryImplementationNames.length));
Arrays.stream(factoryImplementationNames).map(String::trim).forEach(implementations::add);
});
}
result.replaceAll(SpringFactoriesLoader::toDistinctUnmodifiableList);