Remove unnecessary lambda blocks
Remove lambda blocks that aren't needed and replace instead with a simple expression. Issue gh-8945
This commit is contained in:
+5
-6
@@ -221,9 +221,9 @@ public class RSocketMessageHandlerITests {
|
||||
|
||||
@Bean
|
||||
PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
|
||||
rsocket.authorizePayload((authorize) -> {
|
||||
authorize.route("secure.*").authenticated().anyExchange().permitAll();
|
||||
}).basicAuthentication(Customizer.withDefaults());
|
||||
rsocket.authorizePayload(
|
||||
(authorize) -> authorize.route("secure.*").authenticated().anyExchange().permitAll())
|
||||
.basicAuthentication(Customizer.withDefaults());
|
||||
return rsocket.build();
|
||||
}
|
||||
|
||||
@@ -247,9 +247,8 @@ public class RSocketMessageHandlerITests {
|
||||
|
||||
@MessageMapping({ "secure.send", "send" })
|
||||
Mono<Void> send(Mono<String> payload) {
|
||||
return payload.doOnNext(this::add).then(Mono.fromRunnable(() -> {
|
||||
doNotifyAll();
|
||||
}));
|
||||
return payload.doOnNext(this::add).then(Mono.fromRunnable(() -> doNotifyAll()));
|
||||
|
||||
}
|
||||
|
||||
private synchronized void doNotifyAll() {
|
||||
|
||||
+3
-5
@@ -336,12 +336,10 @@ public class HeaderSpecTests {
|
||||
@Test
|
||||
public void headersWhenCustomHeadersWriter() {
|
||||
this.expectedHeaders.add(CUSTOM_HEADER, CUSTOM_VALUE);
|
||||
this.http.headers((headers) -> headers.writer((exchange) -> {
|
||||
return Mono.just(exchange).doOnNext((it) -> {
|
||||
it.getResponse().getHeaders().add(CUSTOM_HEADER, CUSTOM_VALUE);
|
||||
}).then();
|
||||
this.http.headers((headers) -> headers.writer((exchange) -> Mono.just(exchange)
|
||||
.doOnNext((it) -> it.getResponse().getHeaders().add(CUSTOM_HEADER, CUSTOM_VALUE)).then()
|
||||
|
||||
}));
|
||||
));
|
||||
|
||||
assertHeaders();
|
||||
}
|
||||
|
||||
+1
-3
@@ -186,9 +186,7 @@ final class HtmlUnitWebTestClient {
|
||||
}
|
||||
|
||||
private ClientRequest withClientCookies(ClientRequest request) {
|
||||
return ClientRequest.from(request).cookies((c) -> {
|
||||
c.addAll(clientCookies());
|
||||
}).build();
|
||||
return ClientRequest.from(request).cookies((c) -> c.addAll(clientCookies())).build();
|
||||
}
|
||||
|
||||
private MultiValueMap<String, String> clientCookies() {
|
||||
|
||||
Reference in New Issue
Block a user