gnodet commented on code in PR #1944:
URL: https://github.com/apache/maven/pull/1944#discussion_r1865013461


##########
impl/maven-core/src/main/java/org/apache/maven/graph/FilteredProjectDependencyGraph.java:
##########
@@ -74,12 +79,24 @@ public List<MavenProject> getSortedProjects() {
 
     @Override
     public List<MavenProject> getDownstreamProjects(MavenProject project, 
boolean transitive) {
-        return 
applyFilter(projectDependencyGraph.getDownstreamProjects(project, transitive), 
transitive, false);
+        Key key = new Key(project, transitive, false);
+        List<MavenProject> list = cache.get(key);
+        if (list == null) {
+            list = 
applyFilter(projectDependencyGraph.getDownstreamProjects(project, transitive), 
transitive, false);
+            cache.put(key, list);
+        }

Review Comment:
   No, that's what cause failures with #1943 because of a recursive 
computation, which is not allowed by `computeIfAbsent`.



-- 
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