Polish: lamdbas containing only one statement should not nest this statement in a block

This commit is contained in:
igor-suhorukov
2018-02-14 02:12:38 +03:00
committed by Juergen Hoeller
parent 99662bc702
commit 7826567df6
5 changed files with 8 additions and 22 deletions

View File

@@ -91,10 +91,8 @@ public abstract class ExchangeFilterFunctions {
clientRequest -> credentialsFunction.apply(clientRequest).map(
credentials -> {
ClientRequest authorizedRequest = ClientRequest.from(clientRequest)
.headers(headers -> {
headers.set(HttpHeaders.AUTHORIZATION,
authorization(credentials));
})
.headers(headers -> headers.set(HttpHeaders.AUTHORIZATION,
authorization(credentials)))
.build();
return Mono.just(authorizedRequest);
})

View File

@@ -114,9 +114,7 @@ public class RouterFunctionMapping extends AbstractHandlerMapping implements Ini
List<RouterFunction<?>> routerFunctions = routerFunctions();
if (!CollectionUtils.isEmpty(routerFunctions) && logger.isInfoEnabled()) {
routerFunctions.forEach(routerFunction -> {
logger.info("Mapped " + routerFunction);
});
routerFunctions.forEach(routerFunction -> logger.info("Mapped " + routerFunction));
}
this.routerFunction = routerFunctions.stream()
.reduce(RouterFunction::andOther)