diff --git a/libraries/scripting/common/src/kotlin/script/experimental/impl/runSuspend.kt b/libraries/scripting/common/src/kotlin/script/experimental/impl/runSuspend.kt index 8fe3132b831..27d0e6d34f2 100644 --- a/libraries/scripting/common/src/kotlin/script/experimental/impl/runSuspend.kt +++ b/libraries/scripting/common/src/kotlin/script/experimental/impl/runSuspend.kt @@ -34,7 +34,7 @@ private class InternalScriptingRunSuspend : Continuation { fun await(): T = synchronized(this) { while (true) { - when (val result: Result? = this.result) { + when (this.result) { null -> @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (this as Object).wait() else -> break } diff --git a/libraries/scripting/dependencies-maven/src/kotlin/script/experimental/dependencies/maven/MavenDependenciesResolver.kt b/libraries/scripting/dependencies-maven/src/kotlin/script/experimental/dependencies/maven/MavenDependenciesResolver.kt index a5a31dae052..3fcfad11be6 100644 --- a/libraries/scripting/dependencies-maven/src/kotlin/script/experimental/dependencies/maven/MavenDependenciesResolver.kt +++ b/libraries/scripting/dependencies-maven/src/kotlin/script/experimental/dependencies/maven/MavenDependenciesResolver.kt @@ -98,6 +98,7 @@ class MavenDependenciesResolver : ExternalDependenciesResolver { */ setAuthentication( AuthenticationBuilder().apply { + @Suppress("DEPRECATION") val mavenRepo = repositoryCoordinates as? MavenRepositoryCoordinates val username = options.username ?: mavenRepo?.username val password = options.password ?: mavenRepo?.password diff --git a/libraries/scripting/dependencies-maven/src/kotlin/script/experimental/dependencies/maven/impl/aether.kt b/libraries/scripting/dependencies-maven/src/kotlin/script/experimental/dependencies/maven/impl/aether.kt index 109ef57cf2c..b866c627588 100644 --- a/libraries/scripting/dependencies-maven/src/kotlin/script/experimental/dependencies/maven/impl/aether.kt +++ b/libraries/scripting/dependencies-maven/src/kotlin/script/experimental/dependencies/maven/impl/aether.kt @@ -207,7 +207,7 @@ internal class AetherResolveSession( if (mirrors != null) { for (mirror in mirrors) { selector.add( - mirror.id, mirror.url, mirror.layout, false, + mirror.id, mirror.url, mirror.layout, false, false, mirror.mirrorOf, mirror.mirrorOfLayouts ) } diff --git a/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/CachingTest.kt b/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/CachingTest.kt index 4bfc1e102cc..958abb4ff77 100644 --- a/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/CachingTest.kt +++ b/libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/CachingTest.kt @@ -301,7 +301,7 @@ private fun File.readCompiledScript(): CompiledScript { private fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".format(it) }) private fun Class<*>.supertypes(): MutableList> = when { - superclass == null -> interfaces.toMutableList() ?: mutableListOf() + superclass == null -> interfaces.toMutableList() interfaces.isEmpty() -> mutableListOf(superclass) else -> ArrayList>(interfaces.size + 1).apply { interfaces.toCollection(this@apply) diff --git a/libraries/tools/kotlin-script-util/src/test/kotlin/org/jetbrains/kotlin/script/util/ScriptUtilIT.kt b/libraries/tools/kotlin-script-util/src/test/kotlin/org/jetbrains/kotlin/script/util/ScriptUtilIT.kt index 233e46e110f..3b50de9054e 100644 --- a/libraries/tools/kotlin-script-util/src/test/kotlin/org/jetbrains/kotlin/script/util/ScriptUtilIT.kt +++ b/libraries/tools/kotlin-script-util/src/test/kotlin/org/jetbrains/kotlin/script/util/ScriptUtilIT.kt @@ -166,6 +166,7 @@ done put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, messageCollector) addKotlinSourceRoot(scriptPath) + @Suppress("DEPRECATION") getResourcePathForClass(DependsOn::class.java).let { if (it.exists()) { addJvmClasspathRoot(it)