mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 20:19:06 +00:00
Add more nullability annotations to module/spring-boot-cloudfoundry
See gh-46587
This commit is contained in:
+3
-3
@@ -148,13 +148,13 @@ class CloudFoundryWebFluxEndpointHandlerMapping extends AbstractWebFluxEndpointH
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<ResponseEntity<Object>> handle(ServerWebExchange exchange, Map<String, String> body) {
|
||||
public Mono<ResponseEntity<Object>> handle(ServerWebExchange exchange, @Nullable Map<String, String> body) {
|
||||
return this.securityInterceptor.preHandle(exchange, this.endpointId.toLowerCaseString())
|
||||
.flatMap((securityResponse) -> flatMapResponse(exchange, body, securityResponse));
|
||||
}
|
||||
|
||||
private Mono<ResponseEntity<Object>> flatMapResponse(ServerWebExchange exchange, Map<String, String> body,
|
||||
SecurityResponse securityResponse) {
|
||||
private Mono<ResponseEntity<Object>> flatMapResponse(ServerWebExchange exchange,
|
||||
@Nullable Map<String, String> body, SecurityResponse securityResponse) {
|
||||
if (!securityResponse.getStatus().equals(HttpStatus.OK)) {
|
||||
return Mono.just(new ResponseEntity<>(securityResponse.getStatus()));
|
||||
}
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@ class CloudFoundryWebEndpointServletHandlerMapping extends AbstractWebMvcEndpoin
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object handle(HttpServletRequest request, Map<String, String> body) {
|
||||
public @Nullable Object handle(HttpServletRequest request, @Nullable Map<String, String> body) {
|
||||
SecurityResponse securityResponse = this.securityInterceptor.preHandle(request, this.endpointId);
|
||||
if (!securityResponse.getStatus().equals(HttpStatus.OK)) {
|
||||
return new ResponseEntity<Object>(securityResponse.getMessage(), securityResponse.getStatus());
|
||||
|
||||
Reference in New Issue
Block a user