parent
5b92cd841d
commit
b1158bf35d
|
@ -43,7 +43,7 @@ abstract class NamedContributorsMapAdapter<V, C> implements NamedContributors<C>
|
|||
NamedContributorsMapAdapter(Map<String, V> map, Function<V, ? extends C> valueAdapter) {
|
||||
Assert.notNull(map, "Map must not be null");
|
||||
Assert.notNull(valueAdapter, "ValueAdapter must not be null");
|
||||
map.keySet().stream().forEach((key) -> Assert.notNull(key, "Map must not contain null keys"));
|
||||
map.keySet().forEach((key) -> Assert.notNull(key, "Map must not contain null keys"));
|
||||
map.values().stream().map(valueAdapter)
|
||||
.forEach((value) -> Assert.notNull(value, "Map must not contain null values"));
|
||||
this.map = Collections.unmodifiableMap(new LinkedHashMap<>(map));
|
||||
|
|
|
@ -69,7 +69,7 @@ public class SimpleStatusAggregator implements StatusAggregator {
|
|||
|
||||
@Override
|
||||
public Status getAggregateStatus(Set<Status> statuses) {
|
||||
return statuses.stream().filter(this::contains).sorted(this.comparator).findFirst().orElse(Status.UNKNOWN);
|
||||
return statuses.stream().filter(this::contains).min(this.comparator).orElse(Status.UNKNOWN);
|
||||
}
|
||||
|
||||
private boolean contains(Status status) {
|
||||
|
|
|
@ -96,7 +96,7 @@ class EmbeddedMongoAutoConfigurationTests {
|
|||
features.add(Feature.ONLY_WINDOWS_2008_SERVER);
|
||||
}
|
||||
load("spring.mongodb.embedded.features="
|
||||
+ String.join(", ", features.stream().map(Feature::name).collect(Collectors.toList())));
|
||||
+ features.stream().map(Feature::name).collect(Collectors.joining(", ")));
|
||||
assertThat(this.context.getBean(EmbeddedMongoProperties.class).getFeatures())
|
||||
.containsExactlyElementsOf(features);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue