Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4
-
None
-
Windows XP SP3, Intel CPU
Description
NumberUtils.isNumber() should return true for a valid number ending in a trailing decimal place; e.g., "2." should be considered a number because new BigDecimal("2.") works fine. This could be done by adding the code below after line 1444, which is the if (chars[i] == 'e' || chars[i] == 'E') block.
if (chars[i] == '.') {
if (hasDecPoint || hasExp)
return foundDigit; // single trailing decimal point after non-exponent is ok
}