Skip to content

Commit

Permalink
fixed files form Lang #44
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 096881e commit fa2cb07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/Lang/44/org/apache/commons/lang/NumberUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ public static Number createNumber(String val) throws NumberFormatException {
if (val.length() == 0) {
throw new NumberFormatException("\"\" is not a valid number.");
}
if (val.length() == 1 && !Character.isDigit(val.charAt(0))) {
throw new NumberFormatException(val + " is not a valid number.");
}
if (val.startsWith("--")) {
// this is protection for poorness in java.lang.BigDecimal.
// it accepts this as a legal value, but it does not appear
Expand Down

0 comments on commit fa2cb07

Please sign in to comment.