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:
@@ -155,7 +155,7 @@ public class JwtITests {
|
||||
|
||||
@Bean
|
||||
PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
|
||||
rsocket.authorizePayload(authorize -> authorize.anyRequest().authenticated().anyExchange().permitAll())
|
||||
rsocket.authorizePayload((authorize) -> authorize.anyRequest().authenticated().anyExchange().permitAll())
|
||||
.jwt(Customizer.withDefaults());
|
||||
return rsocket.build();
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ public class RSocketMessageHandlerConnectionITests {
|
||||
|
||||
@Bean
|
||||
PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
|
||||
rsocket.authorizePayload(authorize -> authorize.setup().hasRole("SETUP").route("secure.admin.*")
|
||||
rsocket.authorizePayload((authorize) -> authorize.setup().hasRole("SETUP").route("secure.admin.*")
|
||||
.hasRole("ADMIN").route("secure.**").hasRole("USER").route("secure.authority.*")
|
||||
.hasAuthority("ROLE_USER").route("management.*").hasAnyAuthority("ROLE_ADMIN").route("prohibit")
|
||||
.denyAll().anyRequest().permitAll()).basicAuthentication(Customizer.withDefaults());
|
||||
|
||||
@@ -81,7 +81,7 @@ public class RSocketMessageHandlerITests {
|
||||
.transport(TcpServerTransport.create("localhost", 0)).start().block();
|
||||
|
||||
this.requester = RSocketRequester.builder()
|
||||
// .rsocketFactory(factory ->
|
||||
// .rsocketFactory((factory) ->
|
||||
// factory.addRequesterPlugin(payloadInterceptor))
|
||||
.rsocketStrategies(this.handler.getRSocketStrategies())
|
||||
.connectTcp("localhost", this.server.address().getPort()).block();
|
||||
@@ -221,7 +221,7 @@ public class RSocketMessageHandlerITests {
|
||||
|
||||
@Bean
|
||||
PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
|
||||
rsocket.authorizePayload(authorize -> {
|
||||
rsocket.authorizePayload((authorize) -> {
|
||||
authorize.route("secure.*").authenticated().anyExchange().permitAll();
|
||||
}).basicAuthentication(Customizer.withDefaults());
|
||||
return rsocket.build();
|
||||
@@ -242,7 +242,7 @@ public class RSocketMessageHandlerITests {
|
||||
|
||||
@MessageMapping({ "secure.retrieve-flux", "retrieve-flux" })
|
||||
Flux<String> retrieveFlux(Flux<String> payload) {
|
||||
return payload.doOnNext(this::add).map(p -> "hello " + p);
|
||||
return payload.doOnNext(this::add).map((p) -> "hello " + p);
|
||||
}
|
||||
|
||||
@MessageMapping({ "secure.send", "send" })
|
||||
|
||||
@@ -139,7 +139,7 @@ public class SimpleAuthenticationITests {
|
||||
|
||||
@Bean
|
||||
PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
|
||||
rsocket.authorizePayload(authorize -> authorize.anyRequest().authenticated().anyExchange().permitAll())
|
||||
rsocket.authorizePayload((authorize) -> authorize.anyRequest().authenticated().anyExchange().permitAll())
|
||||
.simpleAuthentication(Customizer.withDefaults());
|
||||
return rsocket.build();
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ public class LdapProviderBeanDefinitionParserTests {
|
||||
|
||||
ProviderManager providerManager = this.appCtx.getBean(BeanIds.AUTHENTICATION_MANAGER, ProviderManager.class);
|
||||
assertThat(providerManager.getProviders()).hasSize(1);
|
||||
assertThat(providerManager.getProviders()).extracting("userDetailsContextMapper")
|
||||
.allSatisfy(contextMapper -> assertThat(contextMapper).isInstanceOf(InetOrgPersonContextMapper.class));
|
||||
assertThat(providerManager.getProviders()).extracting("userDetailsContextMapper").allSatisfy(
|
||||
(contextMapper) -> assertThat(contextMapper).isInstanceOf(InetOrgPersonContextMapper.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -153,10 +153,10 @@ public class LdapProviderBeanDefinitionParserTests {
|
||||
|
||||
AuthenticationProvider authenticationProvider = providerManager.getProviders().get(0);
|
||||
assertThat(authenticationProvider).extracting("authenticator.userDnFormat")
|
||||
.satisfies(messageFormats -> assertThat(messageFormats)
|
||||
.satisfies((messageFormats) -> assertThat(messageFormats)
|
||||
.isEqualTo(new MessageFormat[] { new MessageFormat("uid={0},ou=people") }));
|
||||
assertThat(authenticationProvider).extracting("authoritiesPopulator.groupSearchFilter")
|
||||
.satisfies(searchFilter -> assertThat(searchFilter).isEqualTo("member={0}"));
|
||||
.satisfies((searchFilter) -> assertThat(searchFilter).isEqualTo("member={0}"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user