C0urante commented on a change in pull request #11369: URL: https://github.com/apache/kafka/pull/11369#discussion_r720227455
########## File path: clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java ########## @@ -1116,11 +1119,79 @@ public void ensureValid(String name, Object value) { } } + @Override public String toString() { return "non-empty string without ISO control characters"; } } + public static class InstantiableClassValidator implements Validator { + @Override + public void ensureValid(String name, Object value) { + if (value == null) { + // The value will be null if the class couldn't be found; no point in performing follow-up validation + return; + } + + Class<?> cls = (Class<?>) value; + try { + cls.getDeclaredConstructor().newInstance(); Review comment: Think it's worth adding a warning about that to the Javadoc for the class? -- 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