LANG-1527: Remove an redundant argument check in NumberUtils. (#504)
This commit is contained in:
parent
893cc1512b
commit
02732d6132
|
@ -987,13 +987,6 @@ public static BigDecimal createBigDecimal(final String str) {
|
|||
if (StringUtils.isBlank(str)) {
|
||||
throw new NumberFormatException("A blank string is not a valid number");
|
||||
}
|
||||
if (str.trim().startsWith("--")) {
|
||||
// this is protection for poorness in java.lang.BigDecimal.
|
||||
// it accepts this as a legal value, but it does not appear
|
||||
// to be in specification of class. OS X Java parses it to
|
||||
// a wrong value.
|
||||
throw new NumberFormatException(str + " is not a valid number.");
|
||||
}
|
||||
return new BigDecimal(str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue