elharo commented on code in PR #185:
URL:
https://github.com/apache/maven-toolchains-plugin/pull/185#discussion_r3637573490
##########
src/main/java/org/apache/maven/plugins/toolchain/jdk/SelectJdkToolchainMojo.java:
##########
@@ -262,8 +262,17 @@ private boolean matches(String key, String reqVal, String
tcVal) {
}
private String getJdkHome(ToolchainPrivate toolchain) {
- return ((Xpp3Dom) toolchain.getModel().getConfiguration())
- .getChild("jdkHome")
- .getValue();
+ ToolchainModel model = toolchain.getModel();
+ if (model == null) {
+ return null;
Review Comment:
How does the calling code react when this method returns null? Have we just
moved the NullPointerException up a method in the stack?
--
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]