Change in Behavior in ModelMapper Mapping Results

There is a rare change in behavior of mapping results between projection and repository domain. As a result of upgrading to ModelMapper 2.4.5, mapping results may be slightly different. For example, take two related example projection POJOs:

public class Parent {

    private String name;
    private Child child;

}
public class Child {

    private String name;
    private String age;

}

Previously, if you had a mapping scenario where the Child instance was provided, but its instance variables were all null, then that Child instance was rendered as null in the mapping target of the parent. In such a case, you would end up with a mapped target repository domain instance (e.g. "JpaParent") whose "JpaChild" instance is null, even though a Child projection was provided at the source, albeit with all null instance variable values.

After upgrading to version 2.4.5 of ModelMapper, this same scenario will return a "JpaParent" whose "JpaChild" instance variable is populated with an instance (rather than null). This is more correct and more closely resembles the source before mapping. Be aware of this behavior should you notice some unexpected mapping results in this vein post upgrade.

Note, the main reason for the ModelMapper version change is to address https://github.com/modelmapper/modelmapper/issues/606, which can occur sometimes in JDK 11 versions prior to 11.0.13. If needed, this issue can be addressed by using JDK >= 11.0.13 and the ModelMapper version can be reverted to 2.3.8.