Mvel always return the object, we need to check the instanceOf
for say Boolean
, Float
etc.
Also while doing calculation using arithmetic operators , be on a safer side to use null safe values.
for eg, if
your exp is a * b
, and if a or b is null
, then Mvel gives result as false.