GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add unit test for #12600 null-guard in forked executions by gnodet · Pull Request #12923 · apache/maven

Conversation

@gnodet

@gnodet gnodet commented Aug 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

  • Adds unit tests for the ProjectIndex null-guard in MojoExecutor.executeForkedExecutions (issue [maven-4.0.x] MojoExecutor: auto-unbox NPE on missing project index #12600)
  • The production fix was already backported via Fix: make ProjectIndex thread-safe for parallel builds (backport #12832) #12927 (thread-safety for parallel builds)
  • This PR adds the missing test coverage from the original fix Handle missing project index in forked executions #12911

Test plan

  • MojoExecutorForkedExecutionTest passes (2 tests)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gnodet gnodet added bug Something isn't working backport labels Aug 29, 2026
@gnodet gnodet added this to the 3.10.0 milestone Aug 29, 2026
gnodet
gnodet commented Aug 29, 2026
View reviewed changes

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean backport of the #12600 NPE fix to maven-3.10.x. No issues found.

Backport observations:

  • Production code change (int → Integer + null guard + descriptive exception) is identical across all four branches.
  • Test correctly adapted for 3.10.x APIs: @Inject field injection, 3-arg executeForkedExecutions, Collections.singletonList/emptyList for Java 8 compatibility.
  • Test differs from the 3.9.x backport (#12918) only in two comments describing the branch context.
  • All CI checks pass: build (macOS, ubuntu, windows), Jenkins, integration tests (JDK 8, 25, 26).

🔀 Backport Status

All maintenance branches are covered:

  • master — #12911 (MERGED)
  • maven-4.0.x — #12917 (MERGED)
  • maven-3.10.x — #12923 (this PR)
  • maven-3.9.x — #12918 (OPEN)

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cstamas

cstamas commented Aug 30, 2026

Copy link
Copy Markdown
Member

@gnodet can you pls rebase?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gnodet @claude
Fix #12600: handle missing project index in forked executions
897020c
Backport of #12911 (merged to master) to maven-3.10.x.
Guards against NullPointerException from auto-unboxing when
ProjectIndex.getIndices().get() returns null for a project not
in the reactor. Throws descriptive LifecycleExecutionException
instead.

Test adapted for 3.10.x (Java 8 APIs, @Inject field injection).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@gnodet
gnodet force-pushed the backport/12600-to-3.10.x branch from c49ab11 to 897020c Compare August 31, 2026 01:57
@slawekjaranowski

slawekjaranowski commented Aug 31, 2026

Copy link
Copy Markdown
Member

Looks like change was don in #12927
Now we add only UT, so subject of PR should be adjusted

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gnodet gnodet changed the title [backport 3.10.x] Fix #12600: handle missing project index in forked executions Add unit test for #12600 null-guard in forked executions Aug 31, 2026
@gnodet
gnodet merged commit 0acb4e6 into maven-3.10.x Aug 31, 2026
18 of 19 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@gnodet
gnodet deleted the backport/12600-to-3.10.x branch August 31, 2026 08:11
@github-actions github-actions Bot assigned gnodet Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gnodet gnodet

Labels

backport bug Something isn't working

Projects

None yet

Milestone

3.10.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@gnodet @cstamas @slawekjaranowski
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.