Apply code cleanup rules to projects
Apply automated cleanup rules to add `@Override` and `@Deprecated` annotations and to fix class references used with static methods. Issue gh-8945
This commit is contained in:
@@ -61,8 +61,8 @@ public class AuthenticationPayloadExchangeConverter implements PayloadExchangeAu
|
||||
@Override
|
||||
public Mono<Authentication> convert(PayloadExchange exchange) {
|
||||
return Mono
|
||||
.fromCallable(
|
||||
() -> this.metadataExtractor.extract(exchange.getPayload(), this.COMPOSITE_METADATA_MIME_TYPE))
|
||||
.fromCallable(() -> this.metadataExtractor.extract(exchange.getPayload(),
|
||||
AuthenticationPayloadExchangeConverter.COMPOSITE_METADATA_MIME_TYPE))
|
||||
.flatMap(metadata -> Mono.justOrEmpty(authentication(metadata)));
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ public class AuthenticationPayloadInterceptor implements PayloadInterceptor, Ord
|
||||
this.authenticationConverter = authenticationConverter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> intercept(PayloadExchange exchange, PayloadInterceptorChain chain) {
|
||||
return this.authenticationConverter.convert(exchange).switchIfEmpty(chain.next(exchange).then(Mono.empty()))
|
||||
.flatMap(a -> this.authenticationManager.authenticate(a))
|
||||
|
||||
@@ -73,6 +73,7 @@ class ContextPayloadInterceptorChain implements PayloadInterceptorChain {
|
||||
this.next = next;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> next(PayloadExchange exchange) {
|
||||
return Mono.defer(() -> shouldIntercept() ? this.currentInterceptor.intercept(exchange, this.next)
|
||||
: Mono.subscriberContext().doOnNext(c -> this.context = c).then());
|
||||
|
||||
@@ -28,6 +28,7 @@ public abstract class PayloadExchangeMatchers {
|
||||
|
||||
public static PayloadExchangeMatcher setup() {
|
||||
return new PayloadExchangeMatcher() {
|
||||
@Override
|
||||
public Mono<MatchResult> matches(PayloadExchange exchange) {
|
||||
return PayloadExchangeType.SETUP.equals(exchange.getType()) ? MatchResult.match()
|
||||
: MatchResult.notMatch();
|
||||
@@ -37,6 +38,7 @@ public abstract class PayloadExchangeMatchers {
|
||||
|
||||
public static PayloadExchangeMatcher anyRequest() {
|
||||
return new PayloadExchangeMatcher() {
|
||||
@Override
|
||||
public Mono<MatchResult> matches(PayloadExchange exchange) {
|
||||
return exchange.getType().isRequest() ? MatchResult.match() : MatchResult.notMatch();
|
||||
}
|
||||
@@ -45,6 +47,7 @@ public abstract class PayloadExchangeMatchers {
|
||||
|
||||
public static PayloadExchangeMatcher anyExchange() {
|
||||
return new PayloadExchangeMatcher() {
|
||||
@Override
|
||||
public Mono<MatchResult> matches(PayloadExchange exchange) {
|
||||
return MatchResult.match();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user