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/04 14:23:04 UTC
[jira] [Created] (JEXL-172) Unexpected divide error for numerator
which contains division in strict mode
Lars Helge Øverland created JEXL-172:
----------------------------------------
Summary: 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)