flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] pnowojski commented on a change in pull request #8038: [FLINK-11953] Introduce Plugin/Loading system and integrate it with FileSystem
Date Mon, 08 Apr 2019 16:27:31 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message