C0urante commented on code in PR #12010: URL: https://github.com/apache/kafka/pull/12010#discussion_r856213267
########## clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java: ########## @@ -203,4 +205,15 @@ public static Map<String, Object> postProcessReconnectBackoffConfigs(AbstractCon } return rval; } + + public static void postValidateSaslMechanismConfig(AbstractConfig config) { + SecurityProtocol securityProtocol = SecurityProtocol.forName(config.getString(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG)); + String clientSaslMechanism = config.getString(SaslConfigs.SASL_MECHANISM); + if (securityProtocol == SecurityProtocol.SASL_PLAINTEXT || securityProtocol == SecurityProtocol.SASL_SSL) { + if (clientSaslMechanism == null || clientSaslMechanism.trim().isEmpty()) { Review Comment: Isn't the string automatically trimmed here by the `AbstractConfig`? -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org