< prev index next >

src/java.management.rmi/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java

Print this page
@@ -1548,11 +1548,13 @@
          }
  
          public ClassLoader run() {
              Thread currentThread = Thread.currentThread();
              ClassLoader old = currentThread.getContextClassLoader();
-             currentThread.setContextClassLoader(classLoader);
+             if (classLoader != old) {
+                 currentThread.setContextClassLoader(classLoader);
+             }
              return old;
          }
      }
  
      @SuppressWarnings("removal")
< prev index next >