kalayciburak opened a new pull request, #13312: URL: https://github.com/apache/maven/pull/13312
## Summary `setupPluginRealm` restored the class realm and artifacts from `PluginRealmCache` but not the resolver dependency node. The second execution of a plugin therefore left `PluginDescriptor.getDependencyNode()` null, and `MojoExecution.getPlugin().getDependencies()` failed with a `NullPointerException`. The cache record now keeps that node, and a cache hit restores it with the realm. `DefaultPluginRealmCache` stores the supplier record, so the node is not dropped on the way in. ## Test `DefaultMavenPluginManagerRealmCacheTest` sets up the same plugin twice. Before the fix the second descriptor's dependency node was null. The resolver is invoked once, so the second setup is a cache hit. ``` mvn -pl impl/maven-core test -Dtest=DefaultMavenPluginManagerRealmCacheTest,DefaultRealmCacheDisposeTest ``` 3 tests, 0 failures. Checkstyle reported 0 violations. Fixes #13307 -- 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]
