Polish
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user