arturobernalg opened a new pull request, #13575: URL: https://github.com/apache/maven/pull/13575
Backport of #13524 to maven-3.10.x. `AttachedArtifact.getVersion()` returned the version of the parent, but the superclass constructor validates its arguments before the parent is set. When the validation failed, building the error message called `getVersion()` on a null parent and a `NullPointerException` hid the real error. It now falls back to the version of the superclass until the parent is set. The bug is the same on 3.10.x: `AttachedArtifactTest#testParentWithoutVersionRangeIsRejected` fails there with the NullPointerException without the change. `maven-core` passes (422 tests) and spotless is clean. I did not run the integration tests. --- To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) check one of the following: - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0) - [x] I hereby declare that I have filed an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). -- 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]
