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 2019/07/04 12:02:30 UTC

[plc4x] 02/03: Fixed a bug in the code-generation.

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

commit 219034b31bcb82911cd148962944bb3aa9cd228b
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Thu Jul 4 14:00:16 2019 +0200

    Fixed a bug in the code-generation.
---
 .../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 4cb4234..bfdee08 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
@@ -130,7 +130,7 @@ public class ${typeName}IO implements MessageIO<${typeName}<#if helper.isDiscrim
 
         // Reserved Field (Compartmentalized so the "reserved" variable can't leak)
         {
-            ${helper.getLanguageTypeNameForField(field)} reserved = io.${helper.getReadMethodName(field.type)}(${field.type.size});
+            ${helper.getLanguageTypeNameForField(field)} reserved = io.${helper.getReadBufferReadMethodCall(field.type)};
             if(reserved != ${field.referenceValue}) {
                 LOGGER.info("Expected constant value " + ${field.referenceValue} + " but got " + reserved + " for reserved field.");
             }