diff --git a/spring-core/src/main/java/org/springframework/util/NumberUtils.java b/spring-core/src/main/java/org/springframework/util/NumberUtils.java index dbd3854900..e890f64099 100644 --- a/spring-core/src/main/java/org/springframework/util/NumberUtils.java +++ b/spring-core/src/main/java/org/springframework/util/NumberUtils.java @@ -178,7 +178,8 @@ public abstract class NumberUtils { /** * Parse the given {@code text} into a {@link Number} instance of the given * target class, using the corresponding {@code decode} / {@code valueOf} method. - *
Trims the input {@code String} before attempting to parse the number. + *
Trims all whitespace (leading, trailing, and in between characters) from + * the input {@code String} before attempting to parse the number. *
Supports numbers in hex format (with leading "0x", "0X", or "#") as well. * @param text the text to convert * @param targetClass the target class to parse into