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/28 20:45:42 UTC
[PR] Fix #12600: guard against NPE on missing project index in MojoExecutor [maven]
gnodet opened a new pull request, #12907:
URL: https://github.com/apache/maven/pull/12907
## Summary
- Guard against `NullPointerException` caused by auto-unboxing when a project ID is not found in the reactor's `ProjectIndex` during forked execution
- Changed `int index` to `Integer index` and added explicit null checks for both the index lookup and the project lookup
- Throws a descriptive `LifecycleExecutionException` instead of a cryptic NPE when the project is missing
## Test plan
- [x] Existing tests pass (`mvn test` in `impl/maven-core`: 568 tests, 0 failures)
- [ ] Verify with a multi-module project that triggers forked executions (e.g., `maven-javadoc-plugin:aggregate`)
🤖 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 #12600: guard against NPE on missing project index in MojoExecutor [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed pull request #12907: Fix #12600: guard against NPE on missing project index in MojoExecutor
URL: https://github.com/apache/maven/pull/12907
--
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 #12600: guard against NPE on missing project index in MojoExecutor [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #12907:
URL: https://github.com/apache/maven/pull/12907#issuecomment-5463083511
Closing in favor of #12911, which uses the richer `LifecycleExecutionException(String, MojoExecution, MavenProject)` constructor — providing better debugging context.
I've pushed our test (`MojoExecutorForkedExecutionTest`) to #12911 as a new commit: 73c51b78f4.
--
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