C0urante commented on code in PR #12010: URL: https://github.com/apache/kafka/pull/12010#discussion_r853564467
########## clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java: ########## @@ -393,10 +394,14 @@ public class ProducerConfig extends AbstractConfig { MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION_DOC) .define(KEY_SERIALIZER_CLASS_CONFIG, Type.CLASS, + ConfigDef.NO_DEFAULT_VALUE, + new ConfigDef.NonNullValidator(), Importance.HIGH, KEY_SERIALIZER_CLASS_DOC) .define(VALUE_SERIALIZER_CLASS_CONFIG, Type.CLASS, + ConfigDef.NO_DEFAULT_VALUE, + new ConfigDef.NonNullValidator(), Review Comment: We don't need a non-empty validator; any value that's non-null and doesn't refer to a valid Java class will already be met with a `ConfigException` (see [here](https://github.com/apache/kafka/blob/9c3f605fc78f297ecf5accdcdec18471c19cf7d6/clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java#L728-L735) and [here](https://github.com/apache/kafka/blob/9c3f605fc78f297ecf5accdcdec18471c19cf7d6/clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java#L744)). -- 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