dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #38503
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19615: ExpressionUtils, minor
------------------------------------------------------------
revno: 19615
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-07-10 13:54:40 +0200
message:
ExpressionUtils, minor
modified:
dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/ExpressionUtils.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/ExpressionUtils.java'
--- dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/ExpressionUtils.java 2015-07-10 11:32:13 +0000
+++ dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/util/ExpressionUtils.java 2015-07-10 11:54:40 +0000
@@ -87,11 +87,7 @@
*/
public static Double evaluateToDouble( String expression, Map<String, Object> vars )
{
- Expression exp = JEXL.createExpression( expression );
-
- JexlContext context = vars != null ? new MapContext( vars ) : new MapContext();
-
- Object result = exp.evaluate( context );
+ Object result = evaluate( expression, vars );
if ( result == null || !isNumeric( String.valueOf( result ) ) )
{