diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java index 8bde97f9a8..b1b77374e1 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanUtils.java @@ -665,6 +665,8 @@ public abstract class BeanUtils { * a {@code Temporal}, a {@code UUID}, a {@code URI}, a {@code URL}, * a {@code Locale}, or a {@code Class}. *

{@code Void} and {@code void} are not considered simple value types. + *

As of 6.1, this method delegates to {@link ClassUtils#isSimpleValueType} + * as-is but could potentially add further rules for bean property purposes. * @param type the type to check * @return whether the given type represents a "simple" value type * @see #isSimpleProperty(Class) diff --git a/spring-core/src/main/java/org/springframework/util/ClassUtils.java b/spring-core/src/main/java/org/springframework/util/ClassUtils.java index c555f80872..937e296eb2 100644 --- a/spring-core/src/main/java/org/springframework/util/ClassUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ClassUtils.java @@ -544,7 +544,8 @@ public abstract class ClassUtils { * a {@code Locale}, or a {@code Class}. *

{@code Void} and {@code void} are not considered simple value types. * @param type the type to check - * @return whether the given type represents a "simple" value type + * @return whether the given type represents a "simple" value type, + * suggesting value-based data binding and {@code toString} output * @since 6.1 */ public static boolean isSimpleValueType(Class type) { @@ -555,7 +556,7 @@ public abstract class ClassUtils { Number.class.isAssignableFrom(type) || Date.class.isAssignableFrom(type) || Temporal.class.isAssignableFrom(type) || - UUID.class.isAssignableFrom(type) || + UUID.class == type || URI.class == type || URL.class == type || Locale.class == type ||