Use parenthesis with single-arg lambdas
Use regular expression search/replace to ensure all single-arg lambdas have parenthesis. This aligns with the style used in Spring Boot and ensure that single-arg and multi-arg lambdas are consistent. Issue gh-8945
This commit is contained in:
@@ -35,6 +35,6 @@ public class MeController {
|
||||
public Mono<String> me() {
|
||||
return ReactiveSecurityContextHolder.getContext()
|
||||
.map(SecurityContext::getAuthentication)
|
||||
.map(authentication -> "Hello, " + authentication.getName());
|
||||
.map((authentication) -> "Hello, " + authentication.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class WebfluxX509Application {
|
||||
// @formatter:off
|
||||
http
|
||||
.x509(withDefaults())
|
||||
.authorizeExchange(exchanges ->
|
||||
.authorizeExchange((exchanges) ->
|
||||
exchanges
|
||||
.anyExchange().authenticated()
|
||||
);
|
||||
|
||||
@@ -55,7 +55,7 @@ public class WebfluxX509ApplicationTest {
|
||||
.exchange()
|
||||
.expectStatus().isOk()
|
||||
.expectBody()
|
||||
.consumeWith(result -> {
|
||||
.consumeWith((result) -> {
|
||||
String responseBody = new String(result.getResponseBody());
|
||||
assertThat(responseBody).contains("Hello, client");
|
||||
});
|
||||
@@ -79,7 +79,7 @@ public class WebfluxX509ApplicationTest {
|
||||
.trustManager(devCA)
|
||||
.keyManager(clientKey, clientCrt);
|
||||
|
||||
HttpClient httpClient = HttpClient.create().secure(sslContextSpec -> sslContextSpec.sslContext(sslContextBuilder));
|
||||
HttpClient httpClient = HttpClient.create().secure((sslContextSpec) -> sslContextSpec.sslContext(sslContextBuilder));
|
||||
ClientHttpConnector httpConnector = new ReactorClientHttpConnector(httpClient);
|
||||
|
||||
return WebTestClient
|
||||
|
||||
Reference in New Issue
Block a user