You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2020/01/17 16:53:13 UTC
[plc4x] branch develop updated: - Prevent the discrimintator
expressions from being automatically escaped.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new 7f9e201 - Prevent the discrimintator expressions from being automatically escaped.
7f9e201 is described below
commit 7f9e2015a92898f37554e25ccfd2eed0afff8486
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Jan 17 17:53:07 2020 +0100
- Prevent the discrimintator expressions from being automatically escaped.
---
.../language-java/src/main/resources/templates/java/io-template.ftlh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-utils/language-java/src/main/resources/templates/java/io-template.ftlh b/build-utils/language-java/src/main/resources/templates/java/io-template.ftlh
index 3c0457a..da3f67a 100644
--- a/build-utils/language-java/src/main/resources/templates/java/io-template.ftlh
+++ b/build-utils/language-java/src/main/resources/templates/java/io-template.ftlh
@@ -268,7 +268,7 @@ public class ${typeName}IO {
// Switch Field (Depending on the discriminator values, passes the instantiation to a sub-type)
${typeName}Builder builder = null;
<#list field.cases as case>
- <#if case.discriminatorValues?has_content>if(<#list case.discriminatorValues as discriminatorValue>EvaluationHelper.equals(${helper.toSwitchExpression(field.discriminatorNames[discriminatorValue?index])}, ${discriminatorValue})<#sep> && </#sep></#list>) </#if>{
+ <#if case.discriminatorValues?has_content>if(<#list case.discriminatorValues as discriminatorValue>EvaluationHelper.equals(${helper.toSwitchExpression(field.discriminatorNames[discriminatorValue?index])?no_esc}, ${discriminatorValue})<#sep> && </#sep></#list>) </#if>{
builder = ${case.name}IO.parse(io<#if case.parserArguments?has_content>, <#list case.parserArguments as parserArgument>${parserArgument.name}<#sep>, </#sep></#list></#if>);
}<#sep> else </#sep>
</#list>