cmccabe commented on a change in pull request #9990: URL: https://github.com/apache/kafka/pull/9990#discussion_r583245201
########## File path: core/src/main/scala/kafka/server/ConfigHelper.scala ########## @@ -47,11 +47,11 @@ class ConfigHelper(metadataCache: MetadataCache, config: KafkaConfig, configRepo def createResponseConfig(configs: Map[String, Any], createConfigEntry: (String, Any) => DescribeConfigsResponseData.DescribeConfigsResourceResult): DescribeConfigsResponseData.DescribeConfigsResult = { - val filteredConfigPairs = if (resource.configurationKeys == null) + val filteredConfigPairs = if (resource.configurationKeys == null || resource.configurationKeys.isEmpty) Review comment: As you said earlier, the code in 2.7 is broken. So we should't be going based off of that. The correct code in 2.6 does not special-case the empty string. However, it occurs to me that the behavior is the same whether we special case the empty string or not. Since every string contains the empty string, specifying the empty string will have the same effect as specifying null. This is a good example of a case where a field shouldn't have been nullable. Anyway, can you take out the special case? It seems likely to create confusion. ---------------------------------------------------------------- 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