You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/07/22 11:22:33 UTC
[I] NPE in ToolchainsRequirement.getParams() when type is not found [maven-toolchains-plugin]
elharo opened a new issue, #169:
URL: https://github.com/apache/maven-toolchains-plugin/issues/169
## Summary
throws when called with a type that is not present in the toolchains map, instead of returning an empty map or null gracefully.
## Location
https://github.com/apache/maven-toolchains-plugin/blob/master/src/main/java/org/apache/maven/plugins/toolchain/ToolchainsRequirement.java#L42-L44
## Code
## Problem
If is not a key in the map, returns , and throws .
Currently this is only called from with types from , which in turn originates from the entry set keys, so the current callers are safe. However, this is a fragile public API that will break if called with an unknown type.
## Impact
Any future or external caller passing a non-existent type will get an unexpected NPE instead of a gracefully handled missing key.
## Suggested Fix
--
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: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] NPE in ToolchainsRequirement.getParams() when type is not found [maven-toolchains-plugin]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski closed issue #169: NPE in ToolchainsRequirement.getParams() when type is not found
URL: https://github.com/apache/maven-toolchains-plugin/issues/169
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org