[jira] [Created] (LANG-752) Fix createLong() so it behaves like createInteger()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (LANG-752) Fix createLong() so it behaves like createInteger()

Gilles (Jira)
Fix createLong() so it behaves like createInteger()
---------------------------------------------------

                 Key: LANG-752
                 URL: https://issues.apache.org/jira/browse/LANG-752
             Project: Commons Lang
          Issue Type: Sub-task
            Reporter: Sebb


NumberUtils.createLong() does not handle hex numbers, but createInteger() handles hex and octal.

Fix it by using Long.decode() instead of Long.valueOf().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (LANG-752) Fix createLong() so it behaves like createInteger()

Gilles (Jira)

     [ https://issues.apache.org/jira/browse/LANG-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved LANG-752.
-----------------------

       Resolution: Fixed
    Fix Version/s: 3.0.2

> Fix createLong() so it behaves like createInteger()
> ---------------------------------------------------
>
>                 Key: LANG-752
>                 URL: https://issues.apache.org/jira/browse/LANG-752
>             Project: Commons Lang
>          Issue Type: Sub-task
>          Components: lang.math.*
>            Reporter: Sebb
>             Fix For: 3.0.2
>
>
> NumberUtils.createLong() does not handle hex numbers, but createInteger() handles hex and octal.
> Fix it by using Long.decode() instead of Long.valueOf().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira