You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/11/10 01:59:37 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #8826: KAFKA-10090 Misleading warnings: The configuration was supplied but i…

chia7712 commented on a change in pull request #8826:
URL: https://github.com/apache/kafka/pull/8826#discussion_r520237060



##########
File path: clients/src/main/java/org/apache/kafka/common/network/ChannelBuilders.java
##########
@@ -159,24 +159,25 @@ private static ChannelBuilder create(SecurityProtocol securityProtocol,
     }
 
     // Visibility for testing
-    protected static Map<String, Object> channelBuilderConfigs(final AbstractConfig config, final ListenerName listenerName) {
-        Map<String, ?> parsedConfigs;
+    @SuppressWarnings("unchecked")
+    static Map<String, Object> channelBuilderConfigs(final AbstractConfig config, final ListenerName listenerName) {
+        Map<String, Object> parsedConfigs;
         if (listenerName == null)
-            parsedConfigs = config.values();
+            parsedConfigs = (Map<String, Object>) config.values();

Review comment:
       ```java
           if (listenerName == null)
               parsedConfigs = (Map<String, Object>) config.values();
           else
               parsedConfigs = config.valuesWithPrefixOverride(listenerName.configPrefix());
   ```
   
   the method ```config.valuesWithPrefixOverride``` also returns ```RecordingMap so it is ok.




----------------------------------------------------------------
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:
users@infra.apache.org