[backport 3.9.x] Fix #12600: handle missing project index in forked executions - #12918
Open
gnodet wants to merge 1 commit into
Open
[backport 3.9.x] Fix #12600: handle missing project index in forked executions#12918gnodet wants to merge 1 commit into
gnodet wants to merge 1 commit into
Conversation
* fix: handle missing forked project index Signed-off-by: ulofiai <309826581+ulofiai@users.noreply.github.com> * Add test for forked execution project index null guard Test originally written for PR #12907 (our parallel fix for #12600). Contributed here since this PR has the better exception constructor (includes MojoExecution and MavenProject context). See: #12907 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Signed-off-by: ulofiai <309826581+ulofiai@users.noreply.github.com> Co-authored-by: ulofiai <309826581+ulofiai@users.noreply.github.com> Co-authored-by: Guillaume Nodet <gnodet@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
commented
Aug 29, 2026
gnodet
left a comment
Contributor
Author
There was a problem hiding this comment.
✅ Looks Good
Faithful backport of the NPE fix from master (#12911) to maven-3.9.x. CI is fully green across all platforms and Java versions.
The production code fix is identical to master — int to Integer, null check, descriptive LifecycleExecutionException. The only difference is the file path (maven-core/ vs impl/maven-core/), correct for the 3.9.x directory layout.
The test adaptations for 3.9.x are all well done:
Collections.singletonList()/Collections.emptyList()instead ofList.of()for Java 8 compatibility- Reflection-based field injection for
@Requirementinstead of@InjectMocks - 3-arg
executeForkedExecutions(mojoExecution, session, projectIndex)matching the 3.9.x method signature
📋 PR Metadata
| Aspect | Current | Suggested |
|---|---|---|
| Milestone | (none) | 3.9.17 |
🔀 Backport Status
- ✅
maven-3.9.x— this PR - ⏳
maven-4.0.x— #12917 (CI pending) ⚠️ maven-3.10.x— no backport PR found (vulnerable code at line 434)
🤖 This review was generated by ForgeBot. Feedback? File an issue on the ForgeBot repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
master) tomaven-3.9.xNullPointerExceptionfrom auto-unboxing whenProjectIndex.getIndices().get()returns null for a project not in the reactorLifecycleExecutionExceptioninstead@Requirementfield injection)