This commit is contained in:
Stephane Nicoll
2019-12-26 10:42:40 +01:00
parent 1e38dd5531
commit 2c1e81adf0
24 changed files with 65 additions and 78 deletions

View File

@@ -186,7 +186,7 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext
* @param prefix the prefix
* @return the serialized instance
*/
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
private Map<String, Object> safeSerialize(ObjectMapper mapper, Object bean, String prefix) {
try {
return new HashMap<>(mapper.convertValue(bean, Map.class));

View File

@@ -65,13 +65,11 @@ public class PathMappedEndpoints implements Iterable<PathMappedEndpoint> {
private Map<EndpointId, PathMappedEndpoint> getEndpoints(Collection<EndpointsSupplier<?>> suppliers) {
Map<EndpointId, PathMappedEndpoint> endpoints = new LinkedHashMap<>();
suppliers.forEach((supplier) -> {
supplier.getEndpoints().forEach((endpoint) -> {
if (endpoint instanceof PathMappedEndpoint) {
endpoints.put(endpoint.getEndpointId(), (PathMappedEndpoint) endpoint);
}
});
});
suppliers.forEach((supplier) -> supplier.getEndpoints().forEach((endpoint) -> {
if (endpoint instanceof PathMappedEndpoint) {
endpoints.put(endpoint.getEndpointId(), (PathMappedEndpoint) endpoint);
}
}));
return Collections.unmodifiableMap(endpoints);
}

View File

@@ -99,7 +99,7 @@ public class HealthWebEndpointResponseMapper {
}
private WebEndpointResponse<Health> createWebEndpointResponse(Health health) {
Integer status = this.statusHttpMapper.mapStatus(health.getStatus());
int status = this.statusHttpMapper.mapStatus(health.getStatus());
return new WebEndpointResponse<>(health, status);
}