[minor] fix compiler warnings in scripting modules
This commit is contained in:
committed by
teamcityserver
parent
59304ba70c
commit
8eb7e719d3
@@ -34,7 +34,7 @@ private class InternalScriptingRunSuspend<T> : Continuation<T> {
|
|||||||
|
|
||||||
fun await(): T = synchronized(this) {
|
fun await(): T = synchronized(this) {
|
||||||
while (true) {
|
while (true) {
|
||||||
when (val result: Result<T>? = this.result) {
|
when (this.result) {
|
||||||
null -> @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (this as Object).wait()
|
null -> @Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") (this as Object).wait()
|
||||||
else -> break
|
else -> break
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -98,6 +98,7 @@ class MavenDependenciesResolver : ExternalDependenciesResolver {
|
|||||||
*/
|
*/
|
||||||
setAuthentication(
|
setAuthentication(
|
||||||
AuthenticationBuilder().apply {
|
AuthenticationBuilder().apply {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
val mavenRepo = repositoryCoordinates as? MavenRepositoryCoordinates
|
val mavenRepo = repositoryCoordinates as? MavenRepositoryCoordinates
|
||||||
val username = options.username ?: mavenRepo?.username
|
val username = options.username ?: mavenRepo?.username
|
||||||
val password = options.password ?: mavenRepo?.password
|
val password = options.password ?: mavenRepo?.password
|
||||||
|
|||||||
+1
-1
@@ -207,7 +207,7 @@ internal class AetherResolveSession(
|
|||||||
if (mirrors != null) {
|
if (mirrors != null) {
|
||||||
for (mirror in mirrors) {
|
for (mirror in mirrors) {
|
||||||
selector.add(
|
selector.add(
|
||||||
mirror.id, mirror.url, mirror.layout, false,
|
mirror.id, mirror.url, mirror.layout, false, false,
|
||||||
mirror.mirrorOf, mirror.mirrorOfLayouts
|
mirror.mirrorOf, mirror.mirrorOfLayouts
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -301,7 +301,7 @@ private fun File.readCompiledScript(): CompiledScript {
|
|||||||
private fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".format(it) })
|
private fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".format(it) })
|
||||||
|
|
||||||
private fun Class<*>.supertypes(): MutableList<Class<*>> = when {
|
private fun Class<*>.supertypes(): MutableList<Class<*>> = when {
|
||||||
superclass == null -> interfaces.toMutableList() ?: mutableListOf()
|
superclass == null -> interfaces.toMutableList()
|
||||||
interfaces.isEmpty() -> mutableListOf(superclass)
|
interfaces.isEmpty() -> mutableListOf(superclass)
|
||||||
else -> ArrayList<Class<*>>(interfaces.size + 1).apply {
|
else -> ArrayList<Class<*>>(interfaces.size + 1).apply {
|
||||||
interfaces.toCollection(this@apply)
|
interfaces.toCollection(this@apply)
|
||||||
|
|||||||
+1
@@ -166,6 +166,7 @@ done
|
|||||||
|
|
||||||
put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, messageCollector)
|
put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, messageCollector)
|
||||||
addKotlinSourceRoot(scriptPath)
|
addKotlinSourceRoot(scriptPath)
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
getResourcePathForClass(DependsOn::class.java).let {
|
getResourcePathForClass(DependsOn::class.java).let {
|
||||||
if (it.exists()) {
|
if (it.exists()) {
|
||||||
addJvmClasspathRoot(it)
|
addJvmClasspathRoot(it)
|
||||||
|
|||||||
Reference in New Issue
Block a user