Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1
-
None
Description
In the TemplateEngine, inside an Inline-Expression, a String literal containing a curly brace leads to a parser error.
To reproduce, just run this code:
new JexlBuilder().create().createJxltEngine() .createTemplate("${\"{\"}").evaluate(new MapContext(), new StringWriter());
The Exception is either "malformed expression" or "tokenization error", depending on if the inner curly brace is opening or closing.
The problem lies in the parsing state machine of TemplateEngine.parseExpression(). It does not recognize the String literal.