[
https://issues.apache.org/jira/browse/JEXL-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Biestro resolved JEXL-441.
--------------------------------
Resolution: Fixed
- Modified tokenization to accommodate for newlines, etc. in interpolation
strings.
Commit
[61b76f0|https://github.com/apache/commons-jexl/commit/61b76f0b576893c2c53ed6a386089f4e89d9e542]
> tokenization error if "\n" in template expression.
> --------------------------------------------------
>
> Key: JEXL-441
> URL: https://issues.apache.org/jira/browse/JEXL-441
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.5.0
> Reporter: Xu Pengcheng
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.5.1
>
>
> The following code throws an exception: JexlExample.main:19@1:9 tokenization
> error in '"'
> {code:java}
> JexlBuilder jexlBuilder = new JexlBuilder();
> JexlEngine jexl = jexlBuilder.create();
> JexlContext context = new MapContext();
> context.set("name", "Hello");
> String code = "return `${name + \"\\n\" + name}`;";
> JexlScript script = jexl.createScript(code);
> Object result = script.execute(context);
> System.out.println("Expression Result: " + result); {code}
> but if I change to
> {code:java}
> String code = "return `${name + \"\\t\" + name}`;"; {code}
> which works.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)