pnowojski commented on a change in pull request #8038: [FLINK-11953] Introduce 
Plugin/Loading system and integrate it with FileSystem
URL: https://github.com/apache/flink/pull/8038#discussion_r273132981
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/LambdaUtil.java
 ##########
 @@ -76,16 +77,9 @@ private LambdaUtil() {
                        final ClassLoader cl,
                        final ThrowingRunnable<E> r) throws E {
 
-               final Thread currentThread = Thread.currentThread();
-               final ClassLoader oldClassLoader = 
currentThread.getContextClassLoader();
-
-               try {
-                       currentThread.setContextClassLoader(cl);
+               try (TemporaryClassLoaderContext tmpCl = new 
TemporaryClassLoaderContext(cl)) {
 
 Review comment:
   nice findings

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to