clolov commented on code in PR #12010: URL: https://github.com/apache/kafka/pull/12010#discussion_r855715892
########## clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java: ########## @@ -542,8 +544,16 @@ static Map<String, Object> appendSerializerToConfig(Map<String, Object> configs, Map<String, Object> newConfigs = new HashMap<>(configs); if (keySerializer != null) newConfigs.put(KEY_SERIALIZER_CLASS_CONFIG, keySerializer.getClass()); + else { + if (newConfigs.get(KEY_SERIALIZER_CLASS_CONFIG) == null) Review Comment: Similar to what Chris Egerton has suggested above these can also be collapsed into `else-if` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org