This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven.git
commit 4514f9302012a4681907f0041aacb2ee0fde24fc Author: Guillaume Nodet <[email protected]> AuthorDate: Tue Jul 4 11:13:40 2023 +0200 Avoid possible NPE --- src/mdo/model-v3.vm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mdo/model-v3.vm b/src/mdo/model-v3.vm index 9e1bd00be..30bdf24a8 100644 --- a/src/mdo/model-v3.vm +++ b/src/mdo/model-v3.vm @@ -212,9 +212,11 @@ public class ${class.name} } #elseif ( $field.to && $field.to != "String" ) if (!Objects.equals(${field.name}, ${pfx}${cap}())){ - update(getDelegate().with${cap}(${field.name}.getDelegate())); if (${field.name} != null) { + update(getDelegate().with${cap}(${field.name}.getDelegate())); ${field.name}.childrenTracking = this::replace; + } else { + update(getDelegate().with${cap}(null)); } } #else
