Instruct platform code to use NIO2 always

since we're not always use jna (means that we can get warnings about missing jna libs)
and according to the IDEA team, NIO2 works well enough to rely on it
This commit is contained in:
Ilya Chernikov
2019-10-10 17:50:47 +02:00
parent d51291b187
commit 2568804eaa
4 changed files with 19 additions and 6 deletions
@@ -19,13 +19,11 @@ package org.jetbrains.kotlin.cli.common.environment
import com.intellij.openapi.util.SystemInfo
fun setIdeaIoUseFallback() {
if (SystemInfo.isWindows) {
val properties = System.getProperties()
val properties = System.getProperties()
properties.setProperty("idea.io.use.nio2", java.lang.Boolean.TRUE.toString())
properties.setProperty("idea.io.use.nio2", java.lang.Boolean.TRUE.toString())
if (!(SystemInfo.isJavaVersionAtLeast(1, 7, 0) && "1.7.0-ea" != SystemInfo.JAVA_VERSION)) {
properties.setProperty("idea.io.use.fallback", java.lang.Boolean.TRUE.toString())
}
if (!(SystemInfo.isJavaVersionAtLeast(1, 7, 0) && "1.7.0-ea" != SystemInfo.JAVA_VERSION)) {
properties.setProperty("idea.io.use.fallback", java.lang.Boolean.TRUE.toString())
}
}