You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "linenwei (Jira)" <ji...@apache.org> on 2020/09/29 16:57:00 UTC

[jira] [Created] (KAFKA-10534) Modify the originals parameter type of the AbstractConfig class to avoid redundant judgments in the code

linenwei created KAFKA-10534:
--------------------------------

             Summary: Modify the originals parameter type of the AbstractConfig class to avoid redundant judgments in the code
                 Key: KAFKA-10534
                 URL: https://issues.apache.org/jira/browse/KAFKA-10534
             Project: Kafka
          Issue Type: Improvement
          Components: clients
    Affects Versions: 2.6.0
            Reporter: linenwei


{code:java}
 @SuppressWarnings("unchecked")    
  public AbstractConfig(ConfigDef definition, Map<?, ?> originals,  Map<String, ?> configProviderProps, boolean doLog){ 
     /* check that all the keys are really strings */        
      for (Map.Entry<?, ?> entry : originals.entrySet())            
          if (!(entry.getKey() instanceof String))               
              throw new ConfigException(entry.getKey().toString(),       entry.getValue(), "Key must be a string.");


{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)