m1a2st commented on code in PR #20334:
URL: https://github.com/apache/kafka/pull/20334#discussion_r2312167913


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestServerConfig.java:
##########
@@ -139,12 +139,12 @@ public abstract class RestServerConfig extends 
AbstractConfig {
     public static void addPublicConfig(ConfigDef configDef) {
         addInternalConfig(configDef);
         configDef
-                .define(
-                        REST_EXTENSION_CLASSES_CONFIG,
+                .define(REST_EXTENSION_CLASSES_CONFIG,
                         ConfigDef.Type.LIST,
-                        "",
-                        ConfigDef.Importance.LOW, REST_EXTENSION_CLASSES_DOC
-                ).define(ADMIN_LISTENERS_CONFIG,
+                        List.of(),
+                        ConfigDef.ValidList.anyNonDuplicateValues(true, false),
+                        ConfigDef.Importance.LOW, REST_EXTENSION_CLASSES_DOC)
+                .define(ADMIN_LISTENERS_CONFIG,
                         ConfigDef.Type.LIST,
                         null,
                         new AdminListenersValidator(),

Review Comment:
   No, I don’t think it can be replaced. The `AdminListenersValidator` 
specifically checks for empty list entries, and there are two test cases that 
cover this behavior.
   
   
https://github.com/apache/kafka/blob/5441f5e3e1a2d2c6d2454e497148d62212fa891e/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/RestServerConfigTest.java#L120
   
   
https://github.com/apache/kafka/blob/5441f5e3e1a2d2c6d2454e497148d62212fa891e/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/rest/RestServerConfigTest.java#L129



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to