Merge branch '2.0.x'

This commit is contained in:
Stephane Nicoll
2018-09-04 08:52:35 +02:00
5 changed files with 10 additions and 12 deletions

View File

@@ -152,13 +152,11 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext
* @param prefix the prefix
* @return the serialized instance
*/
@SuppressWarnings("unchecked")
private Map<String, Object> safeSerialize(ObjectMapper mapper, Object bean,
String prefix) {
try {
@SuppressWarnings("unchecked")
Map<String, Object> result = new HashMap<>(
mapper.convertValue(bean, Map.class));
return result;
return new HashMap<>(mapper.convertValue(bean, Map.class));
}
catch (Exception ex) {
return new HashMap<>(Collections.singletonMap("error",