gnodet commented on code in PR #1195:
URL: https://github.com/apache/maven/pull/1195#discussion_r1251736267
##########
src/mdo/model-v3.vm:
##########
@@ -201,18 +201,25 @@ public class ${class.name}
if (!Objects.equals(map, getDelegate().get${cap}())) {
update(getDelegate().with${cap}(map));
}
- #else
+ #elseif ( $field.to != "String" && $field.type == "java.util.List" &&
$field.multiplicity == "*" )
+ if (${field.name} == null) {
Review Comment:
So the new code now looks like:
```
public void setDependencies(List<Dependency> dependencies) {
if (dependencies == null) {
dependencies = Collections.emptyList();
}
if (!Objects.equals(dependencies, getDependencies())) {
update(getDelegate().withDependencies(
dependencies.stream().map(c ->
c.getDelegate()).collect(Collectors.toList())));
dependencies.forEach(e -> e.childrenTracking = this::replace);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]