majialoong commented on code in PR #21481:
URL: https://github.com/apache/kafka/pull/21481#discussion_r2896349241


##########
core/src/main/scala/kafka/server/ControllerConfigurationValidator.scala:
##########
@@ -104,42 +103,53 @@ class ControllerConfigurationValidator(kafkaConfig: 
KafkaConfig) extends Configu
     resource.`type`() match {
       case TOPIC =>
         validateTopicName(resource.name())
-        val properties = new Properties()
+        val filteredConfigs = new util.HashMap[String, String]()
         val nullTopicConfigs = new mutable.ArrayBuffer[String]()
         newConfigs.forEach((key, value) => {
           if (value == null) {
             nullTopicConfigs += key
           } else {
-            properties.setProperty(key, value)
+            filteredConfigs.put(key, value)
           }
         })
         if (nullTopicConfigs.nonEmpty) {
           throw new InvalidConfigurationException("Null value not supported 
for topic configs: " +
             nullTopicConfigs.mkString(","))
         }
-        LogConfig.validate(oldConfigs, properties, 
kafkaConfig.extractLogConfigMap,
+        LogConfig.validate(oldConfigs, filteredConfigs, 
kafkaConfig.extractLogConfigMap,
           kafkaConfig.remoteLogManagerConfig.isRemoteStorageSystemEnabled())
       case BROKER => validateBrokerName(resource.name())
       case CLIENT_METRICS =>
-        val properties = new Properties()
-        newConfigs.forEach((key, value) => properties.setProperty(key, value))
-        ClientMetricsConfigs.validate(resource.name(), properties)
+        val filteredConfigs = new util.HashMap[String, String]()

Review Comment:
   Done.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to