You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/10/27 12:32:49 UTC

[plc4x] branch feature/mspec-ng updated: fix(plc4j/codgen): fixed assert field

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch feature/mspec-ng
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/feature/mspec-ng by this push:
     new 0be34a6  fix(plc4j/codgen): fixed assert field
0be34a6 is described below

commit 0be34a6287bf7fbbadb3026a57af204124c90b39
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Oct 27 14:31:19 2021 +0200

    fix(plc4j/codgen): fixed assert field
---
 .../src/main/resources/templates/java/io-template.java.ftlh             | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/code-generation/language-java/src/main/resources/templates/java/io-template.java.ftlh b/code-generation/language-java/src/main/resources/templates/java/io-template.java.ftlh
index d685572..c904416 100644
--- a/code-generation/language-java/src/main/resources/templates/java/io-template.java.ftlh
+++ b/code-generation/language-java/src/main/resources/templates/java/io-template.java.ftlh
@@ -192,7 +192,7 @@ public class ${type.name}IO implements <#if outputFlavor != "passive">MessageIO<
         <#assign namedField = field.asNamedField().orElseThrow()>
 
         // ${field.typeName?cap_first} Field (${namedField.name})
-        ${helper.getLanguageTypeNameForField(field)} ${namedField.name} = read${field.typeName?cap_first}Field("${namedField.name}", ${helper.getDataReaderCall(typedField.type)}, ${type.name}.${namedField.name?upper_case});
+        ${helper.getLanguageTypeNameForField(field)} ${namedField.name} = read${field.typeName?cap_first}Field("${namedField.name}", ${helper.getDataReaderCall(typedField.type)}, ${helper.toParseExpression(assertField, assertField.conditionExpression, parserArguments)});
         <#break>
     <#-- TODO: Port this -->
     <#case "checksum">