This is the only place we check if it is null as far as I can tell.  If we had 
to check in multiple places then it would be worth addressing.  I added the 
Javadoc to make it clear that null is acceptable as an input but null is never 
returned.  I'm not 100% comfortable with that -- requiring non-null as input 
and returning the input would be better.  But now that I write that, it occurs 
to me -- why does this method return anything at all?  A better signature might 
be "void confirmValid(SaslExtensions) throws SaslException" and it would throw 
an exception if it weren't valid -- and accept null as being valid.  The only 
place the return value is used is in the constructor for this class, and we can 
easily check for null there.

[ Full content available at: https://github.com/apache/kafka/pull/5552 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to