[ 
https://issues.apache.org/jira/browse/LANG-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13896913#comment-13896913
 ] 

Sebb commented on LANG-971:
---------------------------

A related bug is that isNumber() does not allow for 0XABCD whereas 
createNumber() allows for both 0xABCD and 0XABCD

> 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