elharo opened a new pull request, #185:
URL: https://github.com/apache/maven-toolchains-plugin/pull/185
Fix potential NullPointerException in `SelectJdkToolchainMojo.getJdkHome()`
by adding null guards for:
- `toolchain.getModel()` returning null
- `model.getConfiguration()` returning null
- `configuration.getChild("jdkHome")` returning null
Uses `instanceof Xpp3Dom` to also prevent ClassCastException if
configuration is not Xpp3Dom.
Includes unit test with `ToolchainPrivate` stubs that prove all three NPE
scenarios against the original code.
--
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]