[
https://issues.apache.org/jira/browse/JEXL-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Biestro closed JEXL-322.
------------------------------
> JXLT String literals cannot contain curly braces
> ------------------------------------------------
>
> Key: JEXL-322
> URL: https://issues.apache.org/jira/browse/JEXL-322
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: Constantin Hirsch
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.2
>
>
> 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:
> {code:java}
> new JexlBuilder().create().createJxltEngine()
> .createTemplate("${\"{\"}").evaluate(new MapContext(), new
> StringWriter());
> {code}
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)