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

Henri Biestro resolved JEXL-169.
--------------------------------
    Resolution: Fixed

JexlArithmetic.isFloatingPointNumber(...)  now checks much more precisely 
whether a string is amenable to float coercion.

src/main/java/org/apache/commons/jexl3/JexlArithmetic.java
src/test/java/org/apache/commons/jexl3/ArithmeticTest.java
src/site/xdoc/changes.xml

Committed revision 1692633.

> 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
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.0
>
>
> 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