showuon commented on a change in pull request #8966:
URL: https://github.com/apache/kafka/pull/8966#discussion_r448393135



##########
File path: core/src/main/scala/kafka/server/AdminManager.scala
##########
@@ -354,10 +354,12 @@ class AdminManager(val config: KafkaConfig,
       }
       def createResponseConfig(configs: Map[String, Any],
                                createConfigEntry: (String, Any) => 
DescribeConfigsResponseData.DescribeConfigsResourceResult): 
DescribeConfigsResponseData.DescribeConfigsResult = {
-        val filteredConfigPairs = configs.filter { case (configName, _) =>
-          /* Always returns true if configNames is None */
-          resource.configurationKeys.asScala.forall(_.contains(configName))
-        }.toBuffer
+        val filteredConfigPairs = if (resource.configurationKeys == null)

Review comment:
       Thanks @huxihx , I agree your suggestion makes the code less and 
simplified. But for better readability, I'd prefer the @tombentley 's 
suggestion. Thank you.




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

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


Reply via email to