diff --git a/idea/tests/org/jetbrains/jet/plugin/MockLibraryUtil.java b/idea/tests/org/jetbrains/jet/plugin/MockLibraryUtil.java index e8de8dffb02..b35439b3880 100644 --- a/idea/tests/org/jetbrains/jet/plugin/MockLibraryUtil.java +++ b/idea/tests/org/jetbrains/jet/plugin/MockLibraryUtil.java @@ -41,6 +41,7 @@ public class MockLibraryUtil { try { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); + // Running compiler in custom class loader to avoid effects caused by replacing Application with another one created in compiler. File kotlinCompilerJar = new File(PathUtil.getKotlinPathsForDistDirectory().getLibPath(), "kotlin-compiler.jar"); URLClassLoader classLoader = new URLClassLoader(new URL[] {kotlinCompilerJar.toURI().toURL()}, Object.class.getClassLoader());