diff --git a/spring-context/src/main/java/org/springframework/validation/FieldError.java b/spring-context/src/main/java/org/springframework/validation/FieldError.java index 774f38cb9fb0..e8b03717cf1d 100644 --- a/spring-context/src/main/java/org/springframework/validation/FieldError.java +++ b/spring-context/src/main/java/org/springframework/validation/FieldError.java @@ -124,8 +124,10 @@ public int hashCode() { @Override public String toString() { + // We would preferably use ObjectUtils.nullSafeConciseToString(rejectedValue) here but + // keep including the full nullSafeToString representation for backwards compatibility. return "Field error in object '" + getObjectName() + "' on field '" + this.field + - "': rejected value [" + ObjectUtils.nullSafeConciseToString(this.rejectedValue) + "]; " + + "': rejected value [" + ObjectUtils.nullSafeToString(this.rejectedValue) + "]; " + resolvableToString(); }