chia7712 commented on code in PR #23785:
URL: https://github.com/apache/kafka/pull/23785#discussion_r4248920995
##########
server/src/main/java/org/apache/kafka/server/ConfigHelperUtils.java:
##########
@@ -72,12 +72,17 @@ public static
DescribeConfigsResponseData.DescribeConfigsResult createResponseCo
// Cast from Map<String, ?> to Map<String, Object> to eliminate
wildcard types. Cached to avoid multiple calls.
@SuppressWarnings("unchecked")
Map<String, Object> nonInternalValues = (Map<String, Object>)
config.nonInternalValues();
+ Map<String, ?> values = config.values();
Stream<Entry<String, Object>> allEntries = Stream.concat(
config.originals().entrySet().stream()
.filter(entry -> entry.getValue() != null
&&
explicitlySetConfigs.contains(entry.getKey())
&&
!nonInternalValues.containsKey(entry.getKey()))
- .map(entry -> Map.entry(entry.getKey(),
entry.getValue())),
+ // Use the parsed value for internal configs, since
createConfigEntry expects values of the
Review Comment:
Nice catch! `createBrokerConfigEntry` works around the same issue in a
different way, but your PR offers a better solution. Anyway, I bet the guard in
`createBrokerConfigEntry` could be removed now.
```scala
else value match {
case v: String => v
case _ => ConfigDef.convertToString(value, configEntryType.orNull)
}
```
--
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]