Skip to content

Commit 4592e5f

Browse files
committed
Nulability for CompletionContext
1 parent a8e87f8 commit 4592e5f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

spring-cloud-gateway-server-webflux/src/main/java/org/springframework/cloud/gateway/filter/ReactiveLoadBalancerClientFilter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ public int getOrder() {
8585
}
8686

8787
@Override
88-
// TODO remove this suppress warnings once the commons changes are merged in for
89-
// CompletionContext
90-
@SuppressWarnings("NullAway")
9188
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
9289
URI url = exchange.getAttribute(GATEWAY_REQUEST_URL_ATTR);
9390
String schemePrefix = exchange.getAttribute(GATEWAY_SCHEME_PREFIX_ATTR);
@@ -123,6 +120,7 @@ public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
123120

124121
// if the `lb:<scheme>` mechanism was used, use `<scheme>` as the default,
125122
// if the loadbalancer doesn't provide one.
123+
Objects.requireNonNull(retrievedInstance, "retrievedInstance can not be null");
126124
String overrideScheme = retrievedInstance.isSecure() ? "https" : "http";
127125
if (schemePrefix != null) {
128126
overrideScheme = url.getScheme();

0 commit comments

Comments
 (0)