gnodet commented on code in PR #1822:
URL: https://github.com/apache/maven/pull/1822#discussion_r1807254941
##########
maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java:
##########
@@ -595,6 +595,8 @@ Model transformFileToRaw(Model model) {
} else {
newDeps.add(dep);
}
+ } else {
+ newDeps.add(dep);
}
}
return modified ? model.withDependencies(newDeps) : model;
Review Comment:
The point is to not recreate a new `Model` object is there's no need to. We
could go further and delay the creation of the list until it's actually needed,
but that would mean store the index, etc... I think the code was less readable.
--
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]