Skip to content

Commit

Permalink
Merge branch '2.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Dec 9, 2019
2 parents eb0eb49 + 9136f54 commit 20bebdc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -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));
Expand Down
Expand Up @@ -69,7 +69,7 @@ public SimpleStatusAggregator(List<String> order) {

@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) {
Expand Down
Expand Up @@ -96,7 +96,7 @@ void customFeatures() {
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);
}
Expand Down

0 comments on commit 20bebdc

Please sign in to comment.