This commit is contained in:
Phillip Webb
2020-04-07 12:10:49 -07:00
parent 1640add8be
commit 3ca896e63f
28 changed files with 66 additions and 73 deletions

View File

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

View File

@@ -162,12 +162,10 @@ public class JerseyEndpointResourceFactory {
}
}
@SuppressWarnings("unchecked")
private Map<String, Object> extractBodyArguments(ContainerRequestContext data) {
Map<String, Object> entity = ((ContainerRequest) data).readEntity(Map.class);
if (entity == null) {
return Collections.emptyMap();
}
return entity;
return (entity != null) ? entity : Collections.emptyMap();
}
private Map<String, Object> extractPathParameters(ContainerRequestContext requestContext) {