cstamas commented on code in PR #1994:
URL: https://github.com/apache/maven/pull/1994#discussion_r1890818480


##########
impl/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java:
##########
@@ -498,18 +499,14 @@ private List<ProjectBuildingResult> build(File pomFile, 
boolean recursive) {
             } catch (ModelBuilderException e) {
                 result = e.getResult();
                 if (result == null || result.getEffectiveModel() == null) {
-                    return List.of(new 
DefaultProjectBuildingResult(e.getModelId(), pomFile, 
convert(e.getProblems())));
+                    return List.of(new DefaultProjectBuildingResult(
+                            e.getModelId(), pomFile, 
convert(e.getProblemCollector())));
                 }
             }
 
             List<ProjectBuildingResult> results = new ArrayList<>();
             List<ModelBuilderResult> allModels = results(result).toList();
             for (ModelBuilderResult r : allModels) {
-                List<ModelProblem> problems = new ArrayList<>(r.getProblems());
-                results(r)
-                        .filter(c -> c != r)
-                        .flatMap(c -> c.getProblems().stream())
-                        .forEach(problems::remove);

Review Comment:
   Sus right here.



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to