From b2a6b6a8f2dce47a0754fb229bc244defaf0011a Mon Sep 17 00:00:00 2001 From: Pinkolik Date: Wed, 29 Dec 2021 18:31:47 +0500 Subject: [PATCH] add nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS for all mappers up version to 1.1.3-RELEAS --- .gitattributes | 1 + README.md | 14 ++++++------ general-classes-generator-conversion/pom.xml | 2 +- .../pom.xml | 4 ++-- .../resources/templates/MapperTemplate.java | 3 ++- general-classes-generator-tests/pom.xml | 2 +- .../test-classes/pom.xml | 2 +- .../test/ver1/IgnoreNullTest.java | 18 +++++++++++++++ .../test/ver2/IgnoreNullTest.java | 9 ++++++++ .../test/ver3/IgnoreNullTest.java | 9 ++++++++ general-classes-generator-tests/tests/pom.xml | 14 ++++++------ .../impl/BaseConverterImplTest.java | 22 +++++++++++++++---- .../converter/BaseConvertersConfig.java | 6 +++++ .../expected/mappers/ver1/EnumMapper.java | 3 ++- .../ver1/InheritanceTestClassMapper.java | 3 ++- .../mappers/ver1/InnerClassMapper.java | 3 ++- .../ver1/InnerClassWithInnerEnumMapper.java | 3 ++- ...ithInnerEnum_InnerClassWithEnumMapper.java | 3 ++- ...um_InnerClassWithEnum_InnerEnumMapper.java | 3 ++- .../mappers/ver1/InnerClass_InnerMapper.java | 3 ++- .../mappers/ver1/ParentClassMapper.java | 3 ++- .../expected/mappers/ver1/SimpleMapper.java | 3 ++- .../expected/mappers/ver2/EnumMapper.java | 3 ++- .../ver2/InheritanceTestClassMapper.java | 3 ++- .../mappers/ver2/InnerClassMapper.java | 3 ++- .../ver2/InnerClassWithInnerEnumMapper.java | 3 ++- ...ithInnerEnum_InnerClassWithEnumMapper.java | 3 ++- ...um_InnerClassWithEnum_InnerEnumMapper.java | 3 ++- .../mappers/ver2/InnerClass_InnerMapper.java | 3 ++- .../mappers/ver2/ParentClassMapper.java | 3 ++- .../expected/mappers/ver2/SimpleMapper.java | 3 ++- .../expected/mappers/ver3/EnumMapper.java | 3 ++- .../ver3/InheritanceTestClassMapper.java | 3 ++- .../mappers/ver3/InnerClassMapper.java | 3 ++- .../ver3/InnerClassWithInnerEnumMapper.java | 3 ++- ...ithInnerEnum_InnerClassWithEnumMapper.java | 3 ++- ...um_InnerClassWithEnum_InnerEnumMapper.java | 3 ++- .../mappers/ver3/InnerClass_InnerMapper.java | 3 ++- .../mappers/ver3/ParentClassMapper.java | 3 ++- .../expected/mappers/ver3/SimpleMapper.java | 3 ++- pom.xml | 2 +- 41 files changed, 137 insertions(+), 52 deletions(-) create mode 100644 .gitattributes create mode 100644 general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver1/IgnoreNullTest.java create mode 100644 general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver2/IgnoreNullTest.java create mode 100644 general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver3/IgnoreNullTest.java diff --git a/ .gitattributes b/ .gitattributes new file mode 100644 index 0000000..07764a7 --- /dev/null +++ b/ .gitattributes @@ -0,0 +1 @@ +* text eol=lf \ No newline at end of file diff --git a/README.md b/README.md index cc65d7a..e9543be 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,7 @@ Add this to your pom.xml. io.github.pinkolik general-classes-generator-maven-plugin - 1.1.2-RELEASE + 1.1.3-RELEASE generate-general-classes @@ -302,7 +302,7 @@ Add this to your pom.xml. io.github.pinkolik general-classes-generator-conversion - 1.1.2-RELEASE + 1.1.3-RELEASE org.mapstruct @@ -325,7 +325,7 @@ Add this to your pom.xml. io.github.pinkolik general-classes-generator-maven-plugin - 1.1.2-RELEASE + 1.1.3-RELEASE generate-mappers @@ -412,7 +412,7 @@ Add this to your pom.xml. io.github.pinkolik general-classes-generator-conversion - 1.1.2-RELEASE + 1.1.3-RELEASE ... @@ -424,7 +424,7 @@ Add this to your pom.xml. io.github.pinkolik general-classes-generator-maven-plugin - 1.1.2-RELEASE + 1.1.3-RELEASE generate-base-converters-config @@ -540,10 +540,10 @@ Project Link: [https://github.com/Pinkolik/general-classes-generator](https://gi [maven-central-plugin-shield]: https://img.shields.io/maven-central/v/io.github.pinkolik/general-classes-generator-maven-plugin?color=success&label=general-classes-generator-maven-plugin&style=plastic -[maven-central-plugin-url]: https://search.maven.org/artifact/io.github.pinkolik/general-classes-generator-maven-plugin/1.1.2-RELEASE/maven-plugin +[maven-central-plugin-url]: https://search.maven.org/artifact/io.github.pinkolik/general-classes-generator-maven-plugin/1.1.3-RELEASE/maven-plugin [maven-central-conversion-shield]: https://img.shields.io/maven-central/v/io.github.pinkolik/general-classes-generator-conversion?color=success&label=general-classes-generator-conversion&style=plastic -[maven-central-conversion-url]: https://search.maven.org/artifact/io.github.pinkolik/general-classes-generator-conversion/1.1.2-RELEASE/jar +[maven-central-conversion-url]: https://search.maven.org/artifact/io.github.pinkolik/general-classes-generator-conversion/1.1.3-RELEASE/jar [build-badge-url]: https://github.com/Pinkolik/general-classes-generator/actions/workflows/maven-publish.yml/badge.svg \ No newline at end of file diff --git a/general-classes-generator-conversion/pom.xml b/general-classes-generator-conversion/pom.xml index 097a3a1..4f0abe0 100644 --- a/general-classes-generator-conversion/pom.xml +++ b/general-classes-generator-conversion/pom.xml @@ -5,7 +5,7 @@ general-classes-generator io.github.pinkolik - 1.1.2-RELEASE + 1.1.3-RELEASE 4.0.0 diff --git a/general-classes-generator-maven-plugin/pom.xml b/general-classes-generator-maven-plugin/pom.xml index 6f2afa3..618187a 100644 --- a/general-classes-generator-maven-plugin/pom.xml +++ b/general-classes-generator-maven-plugin/pom.xml @@ -4,7 +4,7 @@ general-classes-generator io.github.pinkolik - 1.1.2-RELEASE + 1.1.3-RELEASE general-classes-generator-maven-plugin @@ -98,7 +98,7 @@ io.github.pinkolik general-classes-generator-conversion - 1.1.2-RELEASE + 1.1.3-RELEASE diff --git a/general-classes-generator-maven-plugin/src/main/resources/templates/MapperTemplate.java b/general-classes-generator-maven-plugin/src/main/resources/templates/MapperTemplate.java index 37c18cf..d287d6d 100644 --- a/general-classes-generator-maven-plugin/src/main/resources/templates/MapperTemplate.java +++ b/general-classes-generator-maven-plugin/src/main/resources/templates/MapperTemplate.java @@ -1,10 +1,11 @@ package ${package_name}; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import ${base_mapper_name}; -@Mapper(uses = {${additional_mappers}}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {${additional_mappers}}) public interface ${mapper_name} extends ${base_mapper_simple_name}<${versioned_class_name}, ${general_class_name}> { diff --git a/general-classes-generator-tests/pom.xml b/general-classes-generator-tests/pom.xml index 63ac0f3..1e4dc44 100644 --- a/general-classes-generator-tests/pom.xml +++ b/general-classes-generator-tests/pom.xml @@ -5,7 +5,7 @@ general-classes-generator io.github.pinkolik - 1.1.2-RELEASE + 1.1.3-RELEASE 4.0.0 pom diff --git a/general-classes-generator-tests/test-classes/pom.xml b/general-classes-generator-tests/test-classes/pom.xml index 8d682e1..5cf1cd9 100644 --- a/general-classes-generator-tests/test-classes/pom.xml +++ b/general-classes-generator-tests/test-classes/pom.xml @@ -5,7 +5,7 @@ general-classes-generator-tests io.github.pinkolik - 1.1.2-RELEASE + 1.1.3-RELEASE 4.0.0 diff --git a/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver1/IgnoreNullTest.java b/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver1/IgnoreNullTest.java new file mode 100644 index 0000000..355e3b3 --- /dev/null +++ b/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver1/IgnoreNullTest.java @@ -0,0 +1,18 @@ +package io.github.pinkolik.general_classes_generator.test.ver1; + +import lombok.Data; + +@Data +public class IgnoreNullTest { + + public static boolean aWasNotSet = true; + + private String a; + + private String d; + + public void setA(final String a) { + this.a = a; + aWasNotSet = false; + } +} diff --git a/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver2/IgnoreNullTest.java b/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver2/IgnoreNullTest.java new file mode 100644 index 0000000..40843c2 --- /dev/null +++ b/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver2/IgnoreNullTest.java @@ -0,0 +1,9 @@ +package io.github.pinkolik.general_classes_generator.test.ver2; + +import lombok.Data; + +@Data +public class IgnoreNullTest { + + private String b; +} diff --git a/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver3/IgnoreNullTest.java b/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver3/IgnoreNullTest.java new file mode 100644 index 0000000..ed3dd59 --- /dev/null +++ b/general-classes-generator-tests/test-classes/src/main/java/io/github/pinkolik/general_classes_generator/test/ver3/IgnoreNullTest.java @@ -0,0 +1,9 @@ +package io.github.pinkolik.general_classes_generator.test.ver3; + +import lombok.Data; + +@Data +public class IgnoreNullTest { + + private String c; +} diff --git a/general-classes-generator-tests/tests/pom.xml b/general-classes-generator-tests/tests/pom.xml index 279a682..624b289 100644 --- a/general-classes-generator-tests/tests/pom.xml +++ b/general-classes-generator-tests/tests/pom.xml @@ -5,7 +5,7 @@ general-classes-generator-tests io.github.pinkolik - 1.1.2-RELEASE + 1.1.3-RELEASE 4.0.0 @@ -59,17 +59,17 @@ io.github.pinkolik general-classes-generator-conversion - 1.1.2-RELEASE + 1.1.3-RELEASE io.github.pinkolik test-classes - 1.1.2-RELEASE + 1.1.3-RELEASE io.github.pinkolik general-classes-generator-maven-plugin - 1.1.2-RELEASE + 1.1.3-RELEASE test @@ -136,7 +136,7 @@ Deleting old classes - + @@ -146,7 +146,7 @@ io.github.pinkolik general-classes-generator-maven-plugin - 1.1.2-RELEASE + 1.1.3-RELEASE generate-general-classes @@ -198,7 +198,7 @@ io.github.pinkolik test-classes - 1.1.2-RELEASE + 1.1.3-RELEASE diff --git a/general-classes-generator-tests/tests/src/test/java/io/github/pinkolik/general_classes_generator/conversion/impl/BaseConverterImplTest.java b/general-classes-generator-tests/tests/src/test/java/io/github/pinkolik/general_classes_generator/conversion/impl/BaseConverterImplTest.java index 9bd0945..7eea299 100644 --- a/general-classes-generator-tests/tests/src/test/java/io/github/pinkolik/general_classes_generator/conversion/impl/BaseConverterImplTest.java +++ b/general-classes-generator-tests/tests/src/test/java/io/github/pinkolik/general_classes_generator/conversion/impl/BaseConverterImplTest.java @@ -2,6 +2,7 @@ import io.github.pinkolik.general_classes_generator.conversion.BaseConverter; import io.github.pinkolik.general_classes_generator.conversion.Generalized; +import io.github.pinkolik.general_classes_generator.test.IgnoreNullTest; import io.github.pinkolik.general_classes_generator.test.InnerClassWithGenericField; import io.github.pinkolik.general_classes_generator.test.Simple; import io.github.pinkolik.general_classes_generator.test.UpcastingTestClass; @@ -25,8 +26,6 @@ public class BaseConverterImplTest { @Qualifier("baseConverterVer1") private BaseConverter baseConverterVer1; - public static class ClassWithoutMapper implements Generalized {} - /********************************************* * 1. Wrong package test * * 2. Only generalized can be passed test * @@ -153,8 +152,8 @@ void generalToVersionedCollectionTest() { Object result = baseConverterVer1.convertToVersionedClass(obj); - Assertions - .assertTrue(result instanceof io.github.pinkolik.general_classes_generator.test.ver1.InnerClassWithGenericField); + Assertions.assertTrue( + result instanceof io.github.pinkolik.general_classes_generator.test.ver1.InnerClassWithGenericField); List resultList = ((io.github.pinkolik.general_classes_generator.test.ver1.InnerClassWithGenericField) result).getA(); Assertions.assertEquals(3, resultList.size()); @@ -245,4 +244,19 @@ void versionedToGeneralUpcastingCollectionTest() { Assertions.assertEquals(simple.getA(), simpleResult.getA()); } } + + @Test + void generalToVersionedIgnoreNullTest() { + IgnoreNullTest ignoreNullTest = new IgnoreNullTest(); + ignoreNullTest.setD("test"); + + io.github.pinkolik.general_classes_generator.test.ver1.IgnoreNullTest versioned = + (io.github.pinkolik.general_classes_generator.test.ver1.IgnoreNullTest) baseConverterVer1.convertToVersionedClass( + ignoreNullTest); + + Assertions.assertEquals(ignoreNullTest.getD(), versioned.getD()); + Assertions.assertTrue(io.github.pinkolik.general_classes_generator.test.ver1.IgnoreNullTest.aWasNotSet); + } + + public static class ClassWithoutMapper implements Generalized {} } diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/converter/BaseConvertersConfig.java b/general-classes-generator-tests/tests/src/test/resources/expected/converter/BaseConvertersConfig.java index d222db6..6d8219b 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/converter/BaseConvertersConfig.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/converter/BaseConvertersConfig.java @@ -27,6 +27,8 @@ public BaseConverter baseConverterVer1() { versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver1.EnumIsNotSerializable.class, io.github.pinkolik.general_classes_generator.test.mappers.ver1.EnumIsNotSerializableMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.EnumWithField.class, io.github.pinkolik.general_classes_generator.test.mappers.ver1.EnumWithFieldMapper.INSTANCE); versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver1.EnumWithField.class, io.github.pinkolik.general_classes_generator.test.mappers.ver1.EnumWithFieldMapper.INSTANCE); + generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.IgnoreNullTest.class, io.github.pinkolik.general_classes_generator.test.mappers.ver1.IgnoreNullTestMapper.INSTANCE); + versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver1.IgnoreNullTest.class, io.github.pinkolik.general_classes_generator.test.mappers.ver1.IgnoreNullTestMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.InheritanceTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver1.InheritanceTestClassMapper.INSTANCE); versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver1.InheritanceTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver1.InheritanceTestClassMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.InheritanceWithSerializableTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver1.InheritanceWithSerializableTestClassMapper.INSTANCE); @@ -72,6 +74,8 @@ public BaseConverter baseConverterVer2() { versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver2.EnumIsNotSerializable.class, io.github.pinkolik.general_classes_generator.test.mappers.ver2.EnumIsNotSerializableMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.EnumWithField.class, io.github.pinkolik.general_classes_generator.test.mappers.ver2.EnumWithFieldMapper.INSTANCE); versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver2.EnumWithField.class, io.github.pinkolik.general_classes_generator.test.mappers.ver2.EnumWithFieldMapper.INSTANCE); + generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.IgnoreNullTest.class, io.github.pinkolik.general_classes_generator.test.mappers.ver2.IgnoreNullTestMapper.INSTANCE); + versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver2.IgnoreNullTest.class, io.github.pinkolik.general_classes_generator.test.mappers.ver2.IgnoreNullTestMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.InheritanceTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver2.InheritanceTestClassMapper.INSTANCE); versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver2.InheritanceTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver2.InheritanceTestClassMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.InheritanceWithSerializableTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver2.InheritanceWithSerializableTestClassMapper.INSTANCE); @@ -117,6 +121,8 @@ public BaseConverter baseConverterVer3() { versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver3.EnumIsNotSerializable.class, io.github.pinkolik.general_classes_generator.test.mappers.ver3.EnumIsNotSerializableMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.EnumWithField.class, io.github.pinkolik.general_classes_generator.test.mappers.ver3.EnumWithFieldMapper.INSTANCE); versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver3.EnumWithField.class, io.github.pinkolik.general_classes_generator.test.mappers.ver3.EnumWithFieldMapper.INSTANCE); + generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.IgnoreNullTest.class, io.github.pinkolik.general_classes_generator.test.mappers.ver3.IgnoreNullTestMapper.INSTANCE); + versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver3.IgnoreNullTest.class, io.github.pinkolik.general_classes_generator.test.mappers.ver3.IgnoreNullTestMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.InheritanceTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver3.InheritanceTestClassMapper.INSTANCE); versionedClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.ver3.InheritanceTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver3.InheritanceTestClassMapper.INSTANCE); generalClassesToMappers.put(io.github.pinkolik.general_classes_generator.test.InheritanceWithSerializableTestClass.class, io.github.pinkolik.general_classes_generator.test.mappers.ver3.InheritanceWithSerializableTestClassMapper.INSTANCE); diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/EnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/EnumMapper.java index 5dfbbfd..0bb1c3d 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/EnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/EnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface EnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InheritanceTestClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InheritanceTestClassMapper.java index e6880d7..d826d57 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InheritanceTestClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InheritanceTestClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InheritanceTestClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassMapper.java index 65bb0eb..10783e8 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClass_InnerMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClass_InnerMapper.class, }) public interface InnerClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnumMapper.java index 100db49..7c3064c 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClassWithInnerEnum_InnerClassWithEnumMapper.class, InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClassWithInnerEnum_InnerClassWithEnumMapper.class, InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) public interface InnerClassWithInnerEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java index 3c1a08d..01477c3 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) public interface InnerClassWithInnerEnum_InnerClassWithEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java index 6072a4f..3eef546 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClass_InnerMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClass_InnerMapper.java index 13eb35d..1107300 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClass_InnerMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/InnerClass_InnerMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InnerClass_InnerMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/ParentClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/ParentClassMapper.java index 1376de5..5d5094b 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/ParentClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/ParentClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface ParentClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/SimpleMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/SimpleMapper.java index ab76e85..9b67efa 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/SimpleMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver1/SimpleMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver1; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface SimpleMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/EnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/EnumMapper.java index 72d7f1d..fb79734 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/EnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/EnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface EnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InheritanceTestClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InheritanceTestClassMapper.java index e8869d5..41e0e7d 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InheritanceTestClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InheritanceTestClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InheritanceTestClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassMapper.java index b3efbaf..a7af3ca 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClass_InnerMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClass_InnerMapper.class, }) public interface InnerClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnumMapper.java index e09d11a..9ce83a3 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClassWithInnerEnum_InnerClassWithEnumMapper.class, InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClassWithInnerEnum_InnerClassWithEnumMapper.class, InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) public interface InnerClassWithInnerEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java index d4316fd..ef8f82f 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) public interface InnerClassWithInnerEnum_InnerClassWithEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java index ed38cdf..69e9c64 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClass_InnerMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClass_InnerMapper.java index 105c246..ee01760 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClass_InnerMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/InnerClass_InnerMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InnerClass_InnerMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/ParentClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/ParentClassMapper.java index 52d946c..126bff9 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/ParentClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/ParentClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface ParentClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/SimpleMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/SimpleMapper.java index 9ae3950..793b938 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/SimpleMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver2/SimpleMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver2; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface SimpleMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/EnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/EnumMapper.java index ea50606..147e192 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/EnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/EnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface EnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InheritanceTestClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InheritanceTestClassMapper.java index 4abd42c..3621828 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InheritanceTestClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InheritanceTestClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InheritanceTestClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassMapper.java index 198eee0..fafd1d8 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClass_InnerMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClass_InnerMapper.class, }) public interface InnerClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnumMapper.java index d0634b3..037b635 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClassWithInnerEnum_InnerClassWithEnumMapper.class, InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClassWithInnerEnum_InnerClassWithEnumMapper.class, InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) public interface InnerClassWithInnerEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java index c992d9e..22b6870 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnum_InnerClassWithEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.class, }) public interface InnerClassWithInnerEnum_InnerClassWithEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java index 37f6b71..11e1dac 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InnerClassWithInnerEnum_InnerClassWithEnum_InnerEnumMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClass_InnerMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClass_InnerMapper.java index e153bf1..0d397ae 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClass_InnerMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/InnerClass_InnerMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface InnerClass_InnerMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/ParentClassMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/ParentClassMapper.java index 3c10d5b..48e4cc9 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/ParentClassMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/ParentClassMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface ParentClassMapper extends BaseMapper { diff --git a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/SimpleMapper.java b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/SimpleMapper.java index 1bb8129..2a80dd4 100644 --- a/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/SimpleMapper.java +++ b/general-classes-generator-tests/tests/src/test/resources/expected/mappers/ver3/SimpleMapper.java @@ -1,10 +1,11 @@ package io.github.pinkolik.general_classes_generator.test.mappers.ver3; import org.mapstruct.Mapper; +import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.factory.Mappers; import io.github.pinkolik.general_classes_generator.conversion.BaseMapper; -@Mapper(uses = {}) +@Mapper(nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, uses = {}) public interface SimpleMapper extends BaseMapper { diff --git a/pom.xml b/pom.xml index bd262d3..7440bf5 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ io.github.pinkolik general-classes-generator pom - 1.1.2-RELEASE + 1.1.3-RELEASE general-classes-generator-maven-plugin general-classes-generator-conversion