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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to