dalelane commented on code in PR #27579:
URL: https://github.com/apache/flink/pull/27579#discussion_r3645634246


##########
flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java:
##########
@@ -238,25 +238,41 @@ private UserCodeClassLoader getOrResolveClassLoader(
                 verifyIsNotReleased();
 
                 if (resolvedClassLoader == null) {
-                    boolean systemClassLoader =
-                            wrapsSystemClassLoader && libraries.isEmpty() && 
classPaths.isEmpty();
-                    resolvedClassLoader =
-                            new ResolvedClassLoader(
-                                    systemClassLoader
-                                            ? 
ClassLoader.getSystemClassLoader()
-                                            : createUserCodeClassLoader(
-                                                    jobId, applicationId, 
libraries, classPaths),
-                                    libraries,
-                                    classPaths,
-                                    systemClassLoader);
+                    resolvedClassLoader = createResolvedClassLoader(libraries, 
classPaths);
                 } else {
-                    resolvedClassLoader.verifyClassLoader(libraries, 
classPaths);
+                    try {
+                        resolvedClassLoader.verifyClassLoader(libraries, 
classPaths);
+                    } catch (IllegalStateException e) {

Review Comment:
   the Javadoc for this method 
([here](https://github.com/nateab/flink/blob/a1a561a1332df066a390ca4f043ec4b9369d86ad/flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/LibraryCacheManager.java#L75-L76))
 still claims that it will throw an IllegalStateException - although now it's 
handled internally and used to recreate the class loader
   
   This isn't the only implementation of the interface, but from what I can 
see, it was the only one throwing an IllegalStateException, so worth updating 
the javadoc to clarify?



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