PlainSaslServerFactory should allow a null Map
If props is null, use POLICY_NOPLAINTEXT default value: false
Author: Mickael Maison
Reviewers: Ismael Juma Rajini Sivaram
Closes from mimaison/KAFKA-5294
@@ -160,6 +160,7 @@ public class PlainSaslServer implements SaslServer {
@Override
public String[] getMechanismNames(Map<String, ?> props) {
+ if (props == null) return new String[]{PLAIN_MECHANISM};
String noPlainText = (String) props.get(Sasl.POLICY_NOPLAINTEXT);
if ("true".equals(noPlainText))
return new String[]{};
