elharo opened a new pull request, #12936: URL: https://github.com/apache/maven/pull/12936
Backport of #12932 (merge commit `8638f335`) to `maven-3.10.x`, fixing MNG-8174. A self-referencing property used in a plugin configuration attribute caused an NPE during interpolation because `interpolate()` could return `null` while recursing, and the guard `if (org != val)` would still call `setValue`/`setAttribute` with `null`. This backport: - Adds `&& val != null` to both `visit(Xpp3Dom)` setters in `StringVisitorModelInterpolator`. - Adds regression test `testRecursiveExpressionCycleInPluginConfiguration` (asserts 2 model errors on 3.x, since the cycle is reported twice by the older plexus-interpolation) plus a new `StringVisitorModelInterpolatorTest` so the fix is actually exercised on 3.x. Tested: focused new test + full `StringSearchModelInterpolatorTest` (33 tests) pass. Note: `StringVisitorModelInterpolatorTest` has 2 pre-existing, unrelated failures (`testBasedir`/`testBaseUri`) when `projectDir` is null, present even without this change. Closes https://issues.apache.org/jira/browse/MNG-8174 -- 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]
