Skip to content

Commit 02f2d94

Browse files
committed
Polish contribution
See gh-30271
1 parent 7fcbc86 commit 02f2d94

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-core/src/main/java/org/springframework/core/io/support/SpringFactoriesLoader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ protected static Map<String, List<String>> loadFactoriesResource(ClassLoader cla
341341
UrlResource resource = new UrlResource(urls.nextElement());
342342
Properties properties = PropertiesLoaderUtils.loadProperties(resource);
343343
properties.forEach((name, value) -> {
344-
String[] factoryImplementationNames= StringUtils.commaDelimitedListToStringArray((String) value);
345-
List<String> implementations = result.computeIfAbsent(((String) name).trim(), key -> new ArrayList<>(factoryImplementationNames.length));
346-
Arrays.stream(factoryImplementationNames)
347-
.map(String::trim).forEach(implementations::add);
344+
String[] factoryImplementationNames = StringUtils.commaDelimitedListToStringArray((String) value);
345+
List<String> implementations = result.computeIfAbsent(((String) name).trim(),
346+
key -> new ArrayList<>(factoryImplementationNames.length));
347+
Arrays.stream(factoryImplementationNames).map(String::trim).forEach(implementations::add);
348348
});
349349
}
350350
result.replaceAll(SpringFactoriesLoader::toDistinctUnmodifiableList);

0 commit comments

Comments
 (0)