Document NumberUtils.parseNumber() trim behavior

Issue: SPR-9523
This commit is contained in:
Sebastien Deleuze
2018-12-28 09:58:25 +01:00
parent bd6432cb79
commit 78a6429c32

View File

@@ -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