elharo opened a new issue, #12600:
URL: https://github.com/apache/maven/issues/12600

   # MojoExecutor: Auto-unbox NPE on missing project index
   
   **Found in:** maven-4.0.x branch
   **File:** 
`impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java`
 (line 374)
   **Severity:** Medium
   
   ## Description
   
   The method `executeForkedExecutions()` auto-unboxes a potentially null 
`Integer`:
   
   ```java
   int index = projectIndex.getIndices().get(projectId);  // auto-unboxing of 
null
   ```
   
   `projectIndex.getIndices()` returns a `Map<String, Integer>`. If `projectId` 
is not in the map, `Map.get()` returns `null`, which auto-unboxes to `int`, 
throwing a `NullPointerException`. This can happen if a forked execution 
references a project ID that is not in the reactor.


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