desruisseaux commented on code in PR #11700:
URL: https://github.com/apache/maven/pull/11700#discussion_r2833956431
##########
impl/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java:
##########
@@ -520,7 +520,7 @@ List<ProjectBuildingResult> doBuild(List<File> pomFiles,
boolean recursive) {
return pomFiles.stream()
.map(pomFile -> build(pomFile, recursive))
.flatMap(List::stream)
- .collect(Collectors.toList());
+ .toList();
Review Comment:
The work is ported in one piece instead of 3 pieces, but the result is
identical to that we would have if we squashed the 3 commits on master before
to port. The important thing (regarding merge conflicts) is that
`DefaultProjectBuilder.java` (for example) is almost identical on the
`maven-4.0.x` and `master` branches — the differences between the two branches
do not come from this pull requests.
If we do not include the change of `.collect(Collectors.toList())` to
`.toList()` in this pull request, it will create a difference between the
`maven-4.0.x` and `master` branches. In such case, if a change is made on
`master` around those lines, back-porting this change to `maven-4.0.x` will
create a merge conflict.
While separating the tasks is good in principle, in this case it increases
the effort both in splitting this pull request and in resolving merge conflicts
later (unless this pull request is followed by another pull request doing the
changes that we skipped).
--
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]