Polish
Closes gh-11720
This commit is contained in:
@@ -36,7 +36,7 @@ import org.springframework.core.env.PropertySource;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A {@link FailureAnalyzer} that performs analysis of failures caused by a
|
||||
* A {@link FailureAnalyzer} that performs analysis of failures caused by an
|
||||
* {@link InvalidConfigurationPropertyValueException}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
|
||||
@@ -610,9 +610,8 @@ public class MapBinderTests {
|
||||
|
||||
@Override
|
||||
public Map<String, String> convert(String s) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
StringUtils.commaDelimitedListToSet(s).forEach((k) -> map.put(k, ""));
|
||||
return map;
|
||||
return StringUtils.commaDelimitedListToSet(s).stream()
|
||||
.collect(Collectors.toMap((k) -> k, (k) -> ""));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class FailureAnalyzersTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void environmentIsInjectedIntEnvironmentAwareFailureAnalyzers() {
|
||||
public void environmentIsInjectedIntoEnvironmentAwareFailureAnalyzers() {
|
||||
RuntimeException failure = new RuntimeException();
|
||||
analyzeAndReport("basic.factories", failure);
|
||||
verify(failureAnalyzer).setEnvironment(any(Environment.class));
|
||||
|
||||
Reference in New Issue
Block a user