gnodet-bot commented on code in PR #14161:
URL: https://github.com/apache/maven/pull/14161#discussion_r4726090061


##########
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java:
##########
@@ -68,7 +68,8 @@ public void addProject(MavenProject project, Map<String, 
BuildStep> steps) {
     }
 
     public void addStep(MavenProject project, String name, BuildStep step) {
-        plan.get(project).put(name, step);
+        // an aggregating segment only plans the top level project

Review Comment:
   💡 **Nit:** The comment describes the _cause_ (why `module` may be absent 
from `plan`) but not the _behavior_ of the fix (lazy-create on demand). 
Consider:
   
   ```suggestion
           // an aggregating segment only plans the top-level project; create 
the entry lazily for other projects
           plan.computeIfAbsent(project, p -> new HashMap<>()).put(name, step);
   ```



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

Reply via email to