Stephan Knitelius created LANG-971:
--------------------------------------

             Summary: NumberUtils#isNumber(String) fails to evaluate invalid 
Octal numbers
                 Key: LANG-971
                 URL: https://issues.apache.org/jira/browse/LANG-971
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.math.*
    Affects Versions: 3.2.1
            Reporter: Stephan Knitelius
            Priority: Minor


When trying to convert "0085" with NumberUtils.createInteger(String) an 
NumberFormatException is thrown. 

This is because the leading 0 causes the String to be evaluated as an Octal, 8 
is not a valid octal.

However NumberUtils#isNumber(String) evaluates to true, even so it cannot be 
converted.  





--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to