Fixed patchset branches

This commit is contained in:
Alexander Podkhalyuzin
2018-07-06 18:31:21 +03:00
parent 571fda0f45
commit a92ce467a7
3 changed files with 26 additions and 3 deletions
@@ -37,10 +37,9 @@ class CoreJrtFileSystem : DeprecatedVirtualFileSystem() {
val rootUri = URI.create(StandardFileSystems.JRT_PROTOCOL + ":/")
val jrtFsJar = loadJrtFsJar(jdkHome) ?: return@createMap null
val fileSystem =
if (SystemInfo.isJavaVersionAtLeast(9, 0, 0)) {
if (isAtLeastJava9()) {
FileSystems.newFileSystem(rootUri, mapOf("java.home" to jdkHome.absolutePath))
}
else {
} else {
val classLoader = URLClassLoader(arrayOf(jrtFsJar.toURI().toURL()), null)
FileSystems.newFileSystem(rootUri, emptyMap<String, Nothing>(), classLoader)
}
@@ -0,0 +1,12 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.cli.jvm.modules
import com.intellij.openapi.util.SystemInfo
fun isAtLeastJava9(): Boolean {
return SystemInfo.isJavaVersionAtLeast(9, 0, 0)
}
@@ -0,0 +1,12 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.cli.jvm.modules
import com.intellij.openapi.util.SystemInfo
fun isAtLeastJava9(): Boolean {
return SystemInfo.isJavaVersionAtLeast("9")
}