tombentley commented on a change in pull request #8259:
URL: https://github.com/apache/kafka/pull/8259#discussion_r669496427



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/DelegatingClassLoader.java
##########
@@ -82,11 +93,19 @@
         Arrays.stream(SERVICE_LOADER_PLUGINS).map(serviceLoaderPlugin -> 
MANIFEST_PREFIX + serviceLoaderPlugin.getName())
             .collect(Collectors.toSet());
 
+    // Although this classloader does not load classes directly but rather 
delegates loading to a
+    // PluginClassLoader or its parent through its base class, because of the 
use of inheritance in
+    // in the latter case, this classloader needs to also be declared as 
parallel capable to use
+    // fine-grain locking when loading classes.
+    static {

Review comment:
       I think it would be clearer to put this with the static fields rather 
than here after the member fields.
   
   Also, is it worth mentioning that this CL is parallel-capable because it's 
superclass is, and we haven't overridden loadClass/defineClass, and so no 
additional sychronization is necessary?




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