Merge branch '2.7.x' into 3.0.x

Closes gh-36159
This commit is contained in:
Phillip Webb
2023-07-02 14:00:47 +01:00
2 changed files with 29 additions and 1 deletions

View File

@@ -385,7 +385,7 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext
}
private Object stringifyIfNecessary(Object value) {
if (value == null || value.getClass().isPrimitive()) {
if (value == null || ClassUtils.isPrimitiveOrWrapper(value.getClass()) || value instanceof String) {
return value;
}
if (CharSequence.class.isAssignableFrom(value.getClass())) {