Menu
  • HOME
  • TAGS

How to concatenate a String and expression in JEXL

java,jexl

It appears that JEXL is performing the concatenation of 'some text' and output before the ternary operator ?: is performed. With your original expression, 'some text ' + output?'true':'false', I get an output of true. I'm not entirely sure why 'some text ' + false yields true, but there must...

JEXL evaluate returns int

java,jexl

7/2 expression will evaluate to int result and so it is failing to cast Integer to Float, if you want it to be resulting in float you need to change expression to 7 / 2.0F