I'm trying to move from jexl2 to jexl3 and I noticed that it throws exception on variables starting with $. It used to work on jexl2. The problem is that I've been using this extensively everywhere.
This works in jexl2
JexlContext jc = new MapContext();
jc.set("$a", "A00123" );
jc.set("r", r );
Expression e = jexl.createExpression( "r.header.mrn=$a" );
But throws this in jexl3:
Exception in thread "main" org.apache.commons.jexl3.JexlException$Variable: undefined variable a
Is there a workaround or I have no way of moving to jexl3?
It seems that I have no other option but rename my variables when they follow after equal sign:
They have introduced the 'startsWith' and 'endsWith' operators '=^' and '=$' and that's why I get the exception