chia7712 commented on code in PR #16608:
URL: https://github.com/apache/kafka/pull/16608#discussion_r1680190967


##########
clients/src/main/java/org/apache/kafka/common/utils/Utils.java:
##########
@@ -425,7 +425,14 @@ public static <T> T newInstance(String klass, Class<T> 
base) throws ClassNotFoun
      * @return the new class
      */
     public static <T> Class<? extends T> loadClass(String klass, Class<T> 
base) throws ClassNotFoundException {
-        return Class.forName(klass, true, 
Utils.getContextOrKafkaClassLoader()).asSubclass(base);
+        ClassLoader contextOrKafkaClassLoader = 
Utils.getContextOrKafkaClassLoader();
+        // Use loadClass here instead of Class.forName because the name we use 
here may be an alias

Review Comment:
   Those comments about "alias" seem to valid for connector only, right? I mean 
the plugin-able configs in other module (core, storage, and tool) have no 
mechanism about "alias". If the answer is YES, maybe we can tweak the comments 
so as to avoid incorrect assumption that "all" plugin-able configs can use 
"alias".



-- 
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