You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Lars Helge Øverland (JIRA)" <ji...@apache.org> on 2015/08/05 20:51:04 UTC

[jira] [Commented] (JEXL-172) Unexpected divide error for numerator which contains division in strict mode

    [ https://issues.apache.org/jira/browse/JEXL-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658676#comment-14658676 ] 

Lars Helge Øverland commented on JEXL-172:
------------------------------------------

Right. Okay makes sense. Thanks.

> Unexpected divide error for numerator which contains division in strict mode
> ----------------------------------------------------------------------------
>
>                 Key: JEXL-172
>                 URL: https://issues.apache.org/jira/browse/JEXL-172
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>         Environment: Java 7 OpenJDK
>            Reporter: Lars Helge Øverland
>            Priority: Minor
>
> It seems that evaluating expressions which contains nested divisions causes an exception to be thrown with cause "divide error".
> The following expression is valid math and should return 100:
> 1 / (1 / 100)
> Instead it throws:
> org.apache.commons.jexl2.JexlException: org.hisp.dhis.commons.util.ExpressionUtils.evaluate@81![0,13]: '1 / (1 / 100);' divide error
> This only applies to strict mode. However it could be argued that this should pass even in strict mode.
> I could not find anything in the docs about this so please excuse me if I missed something.



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