You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/03/03 09:14:52 UTC

[GitHub] [kafka] maixiaohai commented on a change in pull request #11831: MINOR: Do not throw exception when InterBrokerSecurityProtocolProp value is empty string

maixiaohai commented on a change in pull request #11831:
URL: https://github.com/apache/kafka/pull/11831#discussion_r818455627



##########
File path: core/src/main/scala/kafka/server/KafkaConfig.scala
##########
@@ -1928,9 +1928,11 @@ class KafkaConfig private(doLog: Boolean, val props: java.util.Map[_, _], dynami
 
   private def getInterBrokerListenerNameAndSecurityProtocol: (ListenerName, SecurityProtocol) = {
     Option(getString(KafkaConfig.InterBrokerListenerNameProp)) match {
-      case Some(_) if originals.containsKey(KafkaConfig.InterBrokerSecurityProtocolProp) =>
-        throw new ConfigException(s"Only one of ${KafkaConfig.InterBrokerListenerNameProp} and " +
-          s"${KafkaConfig.InterBrokerSecurityProtocolProp} should be set.")
+      case Some(_) if originals.containsKey(KafkaConfig.InterBrokerSecurityProtocolProp) &&
+        getString(KafkaConfig.InterBrokerSecurityProtocolProp).nonEmpty =>
+          throw new ConfigException(s"Only one of ${KafkaConfig.InterBrokerListenerNameProp} : " +
+            s"${getString(KafkaConfig.InterBrokerListenerNameProp)} and ${KafkaConfig.InterBrokerSecurityProtocolProp} : " +

Review comment:
       Done~  Thanks for your review. 




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org