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/11 01:24:00 UTC

[jira] [Closed] (LANG-1385) NumberUtils.createNumber() throws StringIndexOutOfBoundsException instead of NumberFormatException

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

Rohan Padhye closed LANG-1385.
------------------------------

> NumberUtils.createNumber() throws StringIndexOutOfBoundsException  instead of NumberFormatException
> ---------------------------------------------------------------------------------------------------
>
>                 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
>            Assignee: Gary Gregory
>            Priority: Minor
>             Fix For: 3.8
>
>
> 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)