Document NumberUtils.parseNumber() trim behavior

Issue: SPR-9523
master
Sebastien Deleuze 6 years ago
parent bd6432cb79
commit 78a6429c32
  1. 3
      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.
* <p>Trims the input {@code String} before attempting to parse the number.
* <p>Trims all whitespace (leading, trailing, and in between characters) from
* the input {@code String} before attempting to parse the number.
* <p>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

Loading…
Cancel
Save