You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Rohan Padhye (JIRA)" <ji...@apache.org> on 2018/03/10 23:48:00 UTC

[jira] [Created] (LANG-1385) StringIndexOutOfBoundsException in NumberUtils.createNumber

Rohan Padhye created LANG-1385:
----------------------------------

             Summary: StringIndexOutOfBoundsException in NumberUtils.createNumber
                 Key: LANG-1385
                 URL: https://issues.apache.org/jira/browse/LANG-1385
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.math.*
    Affects Versions: 3.7
            Reporter: Rohan Padhye


Test case:
{noformat}
NumberUtils.createNumber("L"){noformat}

Expected: {{NumberFormatException}}

Got:
{noformat}
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
 at org.apache.commons.lang3.math.NumberUtils.createNumber(NumberUtils.java:528)
{noformat}
 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)