Robert Neßelrath created JEXL-169:
-------------------------------------

             Summary: A string is wrongly identified as FloatingPointNumber
                 Key: JEXL-169
                 URL: https://issues.apache.org/jira/browse/JEXL-169
             Project: Commons JEXL
          Issue Type: Bug
    Affects Versions: 2.1.1
            Reporter: Robert Neßelrath
            Priority: Minor


When concatenating two strings with one containing an 'e' character, an 
ArithmeticException is thrown.

The problem lies in the JexlArithmetic.isFloatingPointNumber() method in line 
200.

return ((string.indexOf(46) != -1) || (string.indexOf(101) != -1) || 
(string.indexOf(69) != -1));

With this solution also the String "New York" or "hello.world" are floating 
point numbers. A solution with a regular expression would be better



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

Reply via email to