[jira] [Created] (LANG-746) NumberUtils does not handle upper-case hex: 0X and -0X

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

[jira] [Created] (LANG-746) NumberUtils does not handle upper-case hex: 0X and -0X

ASF GitHub Bot (Jira)
NumberUtils does not handle upper-case hex: 0X and -0X
------------------------------------------------------

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


NumberUtils.createNumber() should work equally for 0x1234 and 0X1234; currently 0X1234 generates a NumberFormatException

Integer.decode() handles both upper and lower case hex.

--
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] [Updated] (LANG-746) NumberUtils does not handle upper-case hex: 0X and -0X

ASF GitHub Bot (Jira)

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

Sebb updated LANG-746:
----------------------

    Affects Version/s: 3.0
                       3.0.1
        Fix Version/s: 3.0.2

> NumberUtils does not handle upper-case hex: 0X and -0X
> ------------------------------------------------------
>
>                 Key: LANG-746
>                 URL: https://issues.apache.org/jira/browse/LANG-746
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.0, 3.0.1
>            Reporter: Sebb
>             Fix For: 3.0.2
>
>
> NumberUtils.createNumber() should work equally for 0x1234 and 0X1234; currently 0X1234 generates a NumberFormatException
> Integer.decode() handles both upper and lower case hex.

--
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-746) NumberUtils does not handle upper-case hex: 0X and -0X

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Sebb resolved LANG-746.
-----------------------

    Resolution: Fixed

URL: http://svn.apache.org/viewvc?rev=1160660&view=rev
Log:
LANG-746 NumberUtils does not handle upper-case hex: 0X and -0X

Modified:
   commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/math/NumberUtils.java
   commons/proper/lang/trunk/src/site/changes/changes.xml
   commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java

> NumberUtils does not handle upper-case hex: 0X and -0X
> ------------------------------------------------------
>
>                 Key: LANG-746
>                 URL: https://issues.apache.org/jira/browse/LANG-746
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.0, 3.0.1
>            Reporter: Sebb
>
> NumberUtils.createNumber() should work equally for 0x1234 and 0X1234; currently 0X1234 generates a NumberFormatException
> Integer.decode() handles both upper and lower case hex.

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