Merge branch '3.0.x' into 3.1.x

Closes gh-36160
This commit is contained in:
Phillip Webb
2023-07-02 14:01:08 +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())) {