You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2019/08/21 22:01:00 UTC
[jira] [Updated] (JEXL-311) Jxlt template scripts fail using
verbatim expressions embedded in lambdas
[ https://issues.apache.org/jira/browse/JEXL-311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro updated JEXL-311:
-------------------------------
Summary: Jxlt template scripts fail using verbatim expressions embedded in lambdas (was: Jxlt template scripts do not work when verbatim expressions are embedded in lambdas)
> Jxlt template scripts fail using verbatim expressions embedded in lambdas
> -------------------------------------------------------------------------
>
> Key: JEXL-311
> URL: https://issues.apache.org/jira/browse/JEXL-311
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.2
>
>
> It seems lambdas in template break the template interpreter. Quick analysis shows the jexl namespace is not solved, the symbols are not recognised as such.
> The following test should work.
> {code:java}
> @Test
> public void test311a() throws Exception {
> JexlContext ctx = null;
> String rpt
> = "$$((a)->{\n"
> + "<p>Universe ${a}</p>\n"
> + "$$})(42)";
> JxltEngine.Template t = JXLT.createTemplate("$$", new StringReader(rpt));
> StringWriter strw = new StringWriter();
> t.evaluate(ctx, strw);
> String output = strw.toString();
> Assert.assertEquals("<p>Universe 42</p>\n", output);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)