mimaison commented on code in PR #14867:
URL: https://github.com/apache/kafka/pull/14867#discussion_r1434193675


##########
core/src/main/scala/kafka/zk/ZkData.scala:
##########
@@ -1103,11 +1105,11 @@ object ZkData {
     IsrChangeNotificationZNode.path,
     ProducerIdBlockZNode.path,
     LogDirEventNotificationZNode.path
-  ) ++ ConfigType.all.map(ConfigEntityTypeZNode.path)
+  ) ++ 
JavaConverters.asScalaIteratorConverter(ConfigType.ALL.iterator()).asScala.map(ConfigEntityTypeZNode.path)

Review Comment:
   Same as above, can we build this collection without using `JavaConverters`?



##########
core/src/main/scala/kafka/admin/ConfigCommand.scala:
##########
@@ -77,8 +78,9 @@ object ConfigCommand extends Logging {
 
   val BrokerDefaultEntityName = ""
   val BrokerLoggerConfigType = "broker-loggers"
-  val BrokerSupportedConfigTypes = ConfigType.all :+ BrokerLoggerConfigType :+ 
ConfigType.ClientMetrics
-  val ZkSupportedConfigTypes = Seq(ConfigType.User, ConfigType.Broker)
+  @nowarn("cat=deprecation")
+  val BrokerSupportedConfigTypes = 
JavaConverters.asScalaIteratorConverter(ConfigType.ALL.iterator()).asScala.toSeq
 :+ BrokerLoggerConfigType :+ ConfigType.CLIENT_METRICS

Review Comment:
   Why are we using an iterator here? Can we use `val 
BrokerSupportedConfigTypes: Seq[String] = ConfigType.ALL.asScala :+ 
BrokerLoggerConfigType :+ ConfigType.CLIENT_METRICS`?



-- 
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

Reply via email to