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:
Phillip Webb
2020-07-26 12:04:13 -07:00
committed by Rob Winch
parent 8866fa6fb0
commit 9e08b51ed3
558 changed files with 1418 additions and 102 deletions

View File

@@ -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)));
}

View File

@@ -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))

View File

@@ -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());

View File

@@ -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();
}