Polish: Lambdas should be replaced with method references
This commit is contained in:
committed by
Juergen Hoeller
parent
d3a1d44864
commit
6ea0af3540
@@ -18,6 +18,7 @@ package org.springframework.web.reactive.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -101,7 +102,7 @@ public class WebFluxConfigurerComposite implements WebFluxConfigurer {
|
||||
|
||||
@Nullable
|
||||
private <T> T createSingleBean(Function<WebFluxConfigurer, T> factory, Class<T> beanType) {
|
||||
List<T> result = this.delegates.stream().map(factory).filter(t -> t != null).collect(Collectors.toList());
|
||||
List<T> result = this.delegates.stream().map(factory).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
if (result.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user