Use platform class loader in 'kotlin' runner on JDK 9+
#KT-46312 Fixed
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ class JvmCliScriptEvaluationExtension : AbstractScriptEvaluationExtension() {
|
||||
|
||||
private fun getPlatformClassLoader(): ClassLoader? =
|
||||
try {
|
||||
ClassLoader::class.java.getDeclaredMethod("getPlatformClassLoader")?.invoke(null)?.let { it as? ClassLoader }
|
||||
ClassLoader::class.java.getDeclaredMethod("getPlatformClassLoader")?.invoke(null) as? ClassLoader?
|
||||
} catch (_: Exception) {
|
||||
null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user