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

   Fixes auto-unbox NPE in MojoExecutor when forked execution references a 
missing project.
   
   Bug: `projectIndex.getIndices().get(projectId)` returns null for an unknown 
projectId, then `int index = ...` auto-unboxes null to NPE at 
MojoExecutor.java:441. Similarly `getProjects().get(projectId)` can return null 
leading to NPE on `clone`.
   
   Fix: Guard both lookups. If index is null throw LifecycleExecutionException 
with a clear message. If forkedProject is null throw 
LifecycleExecutionException. This surfaces a diagnosable build failure instead 
of an opaque NPE.
   
   Evidence: Verified fix compiles with `mvn -pl impl/maven-core -am compile 
-Dspotless.check.skip=true -o` returning BUILD SUCCESS. Original code path 
would NPE on missing index, patched code throws LifecycleExecutionException as 
intended. Branch verified against upstream/master.
   


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