diff --git a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/CompilerDependencies.java b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/CompilerDependencies.java index 226771fe4b5..fd6abaa85d0 100644 --- a/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/CompilerDependencies.java +++ b/compiler/frontend.java/src/org/jetbrains/jet/lang/resolve/java/CompilerDependencies.java @@ -85,7 +85,7 @@ public class CompilerDependencies { @NotNull public List getJdkHeaderRoots() { if (compilerSpecialMode.includeJdkHeaders()) { - return Collections.singletonList(PathUtil.jarFileToVirtualFile(jdkHeadersJar)); + return Collections.singletonList(PathUtil.jarFileOrDirectoryToVirtualFile(jdkHeadersJar)); } else { return Collections.emptyList(); @@ -95,7 +95,7 @@ public class CompilerDependencies { @NotNull public List getRuntimeRoots() { if (compilerSpecialMode.includeKotlinRuntime()) { - return Collections.singletonList(PathUtil.jarFileToVirtualFile(runtimeJar)); + return Collections.singletonList(PathUtil.jarFileOrDirectoryToVirtualFile(runtimeJar)); } else { return Collections.emptyList(); diff --git a/compiler/util/src/org/jetbrains/jet/utils/PathUtil.java b/compiler/util/src/org/jetbrains/jet/utils/PathUtil.java index cfb151927e2..7e8f472d756 100644 --- a/compiler/util/src/org/jetbrains/jet/utils/PathUtil.java +++ b/compiler/util/src/org/jetbrains/jet/utils/PathUtil.java @@ -118,14 +118,6 @@ public class PathUtil { return roots; } - @NotNull - public static VirtualFile jarFileToVirtualFile(@NotNull File file) { - if (!file.exists() || !file.isFile()) { - throw new IllegalStateException("file must exist and be regular to be converted to virtual file: " + file); - } - return VirtualFileManager.getInstance().findFileByUrl("jar://" + file.getPath() + "!/"); - } - @NotNull public static VirtualFile jarFileOrDirectoryToVirtualFile(@NotNull File file) { if (file.exists()) {