commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Brown (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-1205) NumberUtils.createNumber() behaves inconsistently with Number.isNumber()
Date Tue, 23 Feb 2016 16:40:18 GMT
Daniel Brown created LANG-1205:
----------------------------------

             Summary: NumberUtils.createNumber() behaves inconsistently with Number.isNumber()
                 Key: LANG-1205
                 URL: https://issues.apache.org/jira/browse/LANG-1205
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.math.*
    Affects Versions: 3.1
            Reporter: Daniel Brown


The {{Number.createNumber()}} method fails to check for multiple trailing characters, and
as a result, it returns a value even though {{Number.isNumber()}} indicates that it should
not.  For example:

{code}
boolean isNumber = Number.isNumber("81.5514DD");   // returns false

Number numValue = NumberUtils.createNumber("81.5514DD");  // returns a Double value, 81.5514
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message