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

   Port of 3.10.x fix (commit 835209bb04) to master.
   
   ## Problem
   
   `MavenProject#getPluginManagement()` can return `null` when 
`pluginManagement` is absent from the effective model (e.g. after it was 
removed from the Super POM). Plugins that call this method typically assume a 
non-null return value, leading to `NullPointerException`s.
   
   ## Fix
   
   Return an empty `PluginManagement` instead of `null`, consistent with how 
`getModelBuild()` already ensures a non-null `Build`.
   
   The implementation was slightly compacted compared to the 3.10.x version to 
stay within the 2 000-line checkstyle limit on `MavenProject.java`.
   
   ## Test coverage
   
   Added `MavenProjectTest#pluginManagementShouldReturnNotNull` — verifies that 
a fresh `MavenProject` (no build, no pluginManagement) returns a non-null 
`PluginManagement`.
   
   ---
   
   Port of 3.10.x fix (commit 835209bb04, author: Slawomir Jaranowski).
   
   _Hermes Agent (Claude Opus 4) on behalf of Guillaume Nodet_
   


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