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/10 12:32:28 UTC
[plc4x] branch next-gen-core updated: Made the template generate a
JSon annotation not only for abstract types.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch next-gen-core
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/next-gen-core by this push:
new 17c3c12 Made the template generate a JSon annotation not only for abstract types.
17c3c12 is described below
commit 17c3c126c80c6d03596f0fef46b3912ad653672c
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Fri Jan 10 13:32:21 2020 +0100
Made the template generate a JSon annotation not only for abstract types.
---
.../language-java/src/main/resources/templates/java/pojo-template.ftlh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-utils/language-java/src/main/resources/templates/java/pojo-template.ftlh b/build-utils/language-java/src/main/resources/templates/java/pojo-template.ftlh
index 41e3ee3..593abdf 100644
--- a/build-utils/language-java/src/main/resources/templates/java/pojo-template.ftlh
+++ b/build-utils/language-java/src/main/resources/templates/java/pojo-template.ftlh
@@ -51,7 +51,7 @@ import java.time.*;
import java.util.Objects;
import java.math.BigInteger;
-<#if type.abstract>@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "className")</#if>
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "className")
public<#if type.abstract> abstract</#if> class ${typeName}<#if type.parentType??> extends ${type.parentType.name}</#if> implements Message {
<#if helper.isDiscriminatedType(type)>