mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Add more nullability annotations to module/spring-boot-actuator
See gh-46587
This commit is contained in:
+4
-2
@@ -338,7 +338,8 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
|
||||
return isFilterMatch(filter, getFilterEndpoint(endpointBean));
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
// Doesn't detect lambda with correct nullability
|
||||
@SuppressWarnings({ "unchecked", "NullAway" })
|
||||
private boolean isFilterMatch(EndpointFilter<E> filter, E endpoint) {
|
||||
Boolean result = LambdaSafe.callback(EndpointFilter.class, filter, endpoint)
|
||||
.withLogger(EndpointDiscoverer.class)
|
||||
@@ -357,7 +358,8 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
// Doesn't detect lambda with correct nullability
|
||||
@SuppressWarnings({ "unchecked", "NullAway" })
|
||||
private boolean isFilterMatch(OperationFilter<O> filter, Operation operation, EndpointId endpointId,
|
||||
Access defaultAccess) {
|
||||
Boolean result = LambdaSafe.callback(OperationFilter.class, filter, operation)
|
||||
|
||||
+3
-2
@@ -80,8 +80,9 @@ public class HealthEndpointWebExtension extends HealthEndpointSupport<Health, He
|
||||
return health(apiVersion, serverNamespace, securityContext, false, path);
|
||||
}
|
||||
|
||||
public WebEndpointResponse<HealthDescriptor> health(ApiVersion apiVersion, WebServerNamespace serverNamespace,
|
||||
SecurityContext securityContext, boolean showAll, String... path) {
|
||||
public WebEndpointResponse<HealthDescriptor> health(ApiVersion apiVersion,
|
||||
@Nullable WebServerNamespace serverNamespace, SecurityContext securityContext, boolean showAll,
|
||||
String... path) {
|
||||
Result<HealthDescriptor> result = getResult(apiVersion, serverNamespace, securityContext, showAll, path);
|
||||
if (result == null) {
|
||||
return (Arrays.equals(path, EMPTY_PATH))
|
||||
|
||||
+2
-1
@@ -81,7 +81,8 @@ public class ReactiveHealthEndpointWebExtension
|
||||
}
|
||||
|
||||
public Mono<WebEndpointResponse<? extends HealthDescriptor>> health(ApiVersion apiVersion,
|
||||
WebServerNamespace serverNamespace, SecurityContext securityContext, boolean showAll, String... path) {
|
||||
@Nullable WebServerNamespace serverNamespace, SecurityContext securityContext, boolean showAll,
|
||||
String... path) {
|
||||
Result<Mono<? extends HealthDescriptor>> result = getResult(apiVersion, serverNamespace, securityContext,
|
||||
showAll, path);
|
||||
if (result == null) {
|
||||
|
||||
Reference in New Issue
Block a user