You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/08/27 01:09:18 UTC

[PR] Fix #12832: guard missing project index before auto-unbox NPE [maven]

gnodet opened a new pull request, #12861:
URL: https://github.com/apache/maven/pull/12861

   ## Summary
   
   - Guard `projectIndex.getIndices().get(projectId)` and `projectIndex.getProjects().get(projectId)` with null checks in `MojoExecutor.executeForkedExecutions()`
   - Throw `LifecycleExecutionException` with a clear diagnostic message instead of an opaque auto-unbox `NullPointerException`
   - The `projectId` can legitimately be missing from the cached `ProjectIndex` under parallel builds (`-T`), stale cached index (extensions modifying session projects), or embedded/daemon Maven usage
   
   ## Test plan
   
   - [x] `mvn -pl impl/maven-core -am compile` — BUILD SUCCESS
   - [x] `mvn -pl impl/maven-core test` — 612 tests pass, 0 failures
   - [ ] CI green
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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-unsubscribe@maven.apache.org

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


Re: [PR] Fix #12832: guard missing project index before auto-unbox NPE [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #12861:
URL: https://github.com/apache/maven/pull/12861#issuecomment-5435303735

   Closing as duplicate of #12832 which addresses the same issue with the same approach.


-- 
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-unsubscribe@maven.apache.org

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


Re: [PR] Fix #12832: guard missing project index before auto-unbox NPE [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed pull request #12861: Fix #12832: guard missing project index before auto-unbox NPE
URL: https://github.com/apache/maven/pull/12861


-- 
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-unsubscribe@maven.apache.org

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