You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/07 11:53:59 UTC

[GitHub] [flink] AHeise commented on a change in pull request #13031: [FLINK-18773][runtime] Enables parallel user-code and plugin class loader.

AHeise commented on a change in pull request #13031:
URL: https://github.com/apache/flink/pull/13031#discussion_r466992670



##########
File path: flink-core/src/main/java/org/apache/flink/util/ChildFirstClassLoader.java
##########
@@ -73,9 +71,7 @@ public ChildFirstClassLoader(
 				// let URLClassLoader do it, which will eventually call the parent
 				c = super.loadClassWithoutExceptionHandling(name, resolve);
 			}
-		}
-
-		if (resolve) {
+		} else if (resolve) {

Review comment:
       It's a small performance optimization (should probably go in a separate hotfix commit). The typical class loading pattern indeed has this trailing resolution with an if, but in `ChildFirstClassLoader`, the resolution already happens at `super.loadClassWithoutExceptionHandling(name, resolve)`. So it should never be necessary to resolve it additionally.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org