NumberUtils.isNumber(String)  is not right when the String is "1.1L"
--------------------------------------------------------------------

                 Key: LANG-664
                 URL: https://issues.apache.org/jira/browse/LANG-664
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.math.*
            Reporter: 雷钦


"1.1L"  is not a Java Number . but NumberUtils.isNumber(String) return true.

perhaps :
change:
            if (chars[i] == 'l'
                || chars[i] == 'L') {
                // not allowing L with an exponent
                return foundDigit && !hasExp;
            }
to:
            if (chars[i] == 'l'
                || chars[i] == 'L') {
                // not allowing L with an exponent
                return foundDigit && !hasExp && !hasDecPoint;
            }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to