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)