Yunyung commented on code in PR #19867: URL: https://github.com/apache/kafka/pull/19867#discussion_r2146819314
########## core/src/main/scala/kafka/server/ConfigHelper.scala: ########## @@ -86,19 +81,34 @@ class ConfigHelper(metadataCache: MetadataCache, config: KafkaConfig, configRepo includeSynonyms: Boolean, includeDocumentation: Boolean): List[DescribeConfigsResponseData.DescribeConfigsResult] = { resourceToConfigNames.map { resource => - - def createResponseConfig(configs: Map[String, Any], + def createResponseConfig(configs: Any, createConfigEntry: (String, Any) => DescribeConfigsResponseData.DescribeConfigsResourceResult): DescribeConfigsResponseData.DescribeConfigsResult = { - val filteredConfigPairs = if (resource.configurationKeys == null || resource.configurationKeys.isEmpty) - configs.toBuffer - else - configs.filter { case (configName, _) => - resource.configurationKeys.asScala.contains(configName) - }.toBuffer + val stream = configs match { + case c: AbstractConfig => + val nonInternalStream = c.nonInternalValues.entrySet.stream() + val originalsFiltered = c.originals.entrySet.stream() + .filter(e => + e.getValue != null && + !c.nonInternalValues.containsKey(e.getKey) // exclude keys already in nonInternalValues Review Comment: Why do we need this? Is it possible to have the same key? -- 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