RivenSun2 commented on code in PR #12010: URL: https://github.com/apache/kafka/pull/12010#discussion_r856218757
########## 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: Oh, you are right. The `ConfigDef.parseType` method already does this logic. Thanks. -- 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