From 0a9089bc725be6cde15bf0136ee59100aa2ba72e Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Tue, 18 Aug 2020 11:56:01 +0200 Subject: [PATCH] Set correct base classloader for REPL evaluation the contributed partial fix of KT-35925 set it to the system classloader which brought in many cases the compiler CP into the evaluation and lead to the problems like KT-40898. This fix set it to the extension/platform classloader, which preserves (partial) fix of the KT-35925 and do not bring the compiler jar into the REPL evaluation classpath. #KT-40898 fixed --- .../kotlin/scripting/compiler/plugin/repl/ReplInterpreter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/repl/ReplInterpreter.kt b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/repl/ReplInterpreter.kt index de01efa290a..862f750463f 100644 --- a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/repl/ReplInterpreter.kt +++ b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/repl/ReplInterpreter.kt @@ -42,7 +42,7 @@ class ReplInterpreter( ReplClassLoader( URLClassLoader( classpathRoots.map { it.toURI().toURL() }.toTypedArray(), - ClassLoader.getSystemClassLoader() + ClassLoader.getSystemClassLoader()?.parent ) )