From 40b9cc1f785eaae352267757ac9e091c25ed0744 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 7 Nov 2018 22:16:46 +0100 Subject: Upgrade to Kotlin 1.3.0 final. --- src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt | 3 +++ src/main/kotlin/pl/treksoft/kvision/remote/JoobyRemoteAgent.kt | 2 ++ src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt | 2 ++ src/main/kotlin/pl/treksoft/kvision/remote/SpringRemoteAgent.kt | 2 ++ 4 files changed, 9 insertions(+) (limited to 'src/main/kotlin/pl/treksoft/kvision/remote') diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt b/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt index a48a6b1f..4a086e2a 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/CallAgent.kt @@ -21,6 +21,8 @@ */ package pl.treksoft.kvision.remote +import kotlinx.serialization.ImplicitReflectionSerializer +import kotlinx.serialization.stringify import pl.treksoft.jquery.JQueryAjaxSettings import pl.treksoft.jquery.JQueryXHR import pl.treksoft.jquery.jQuery @@ -49,6 +51,7 @@ open class CallAgent { * @param data data to be sent * @return a promise of the result */ + @UseExperimental(ImplicitReflectionSerializer::class) @Suppress("UnsafeCastFromDynamic") fun jsonRpcCall( url: String, diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/JoobyRemoteAgent.kt b/src/main/kotlin/pl/treksoft/kvision/remote/JoobyRemoteAgent.kt index b4cc6c21..30d2062d 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/JoobyRemoteAgent.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/JoobyRemoteAgent.kt @@ -23,6 +23,7 @@ package pl.treksoft.kvision.remote import kotlinx.coroutines.Deferred import kotlinx.coroutines.asDeferred +import kotlinx.serialization.ImplicitReflectionSerializer import kotlinx.serialization.list import kotlinx.serialization.serializer import pl.treksoft.kvision.utils.JSON @@ -34,6 +35,7 @@ import kotlin.js.JSON as NativeJSON * Client side agent for JSON-RPC remote calls with Jooby. */ @Suppress("LargeClass", "TooManyFunctions") +@UseExperimental(ImplicitReflectionSerializer::class) open class JoobyRemoteAgent(val serviceManager: JoobyServiceManager) : RemoteAgent { val callAgent = CallAgent() diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt b/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt index b1ee4fde..cbb2978a 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt @@ -21,6 +21,7 @@ */ package pl.treksoft.kvision.remote +import kotlinx.serialization.ImplicitReflectionSerializer import kotlinx.serialization.KSerializer import kotlinx.serialization.internal.BooleanSerializer import kotlinx.serialization.internal.ByteSerializer @@ -52,6 +53,7 @@ interface RemoteAgent { * @suppress * Internal function */ + @UseExperimental(ImplicitReflectionSerializer::class) @Suppress("ComplexMethod", "TooGenericExceptionCaught", "NestedBlockDepth") fun trySerialize(kClass: KClass, value: Any): String { return if (value is List<*>) { diff --git a/src/main/kotlin/pl/treksoft/kvision/remote/SpringRemoteAgent.kt b/src/main/kotlin/pl/treksoft/kvision/remote/SpringRemoteAgent.kt index f1f3b473..f329d10e 100644 --- a/src/main/kotlin/pl/treksoft/kvision/remote/SpringRemoteAgent.kt +++ b/src/main/kotlin/pl/treksoft/kvision/remote/SpringRemoteAgent.kt @@ -23,6 +23,7 @@ package pl.treksoft.kvision.remote import kotlinx.coroutines.Deferred import kotlinx.coroutines.asDeferred +import kotlinx.serialization.ImplicitReflectionSerializer import kotlinx.serialization.list import kotlinx.serialization.serializer import pl.treksoft.kvision.utils.JSON @@ -34,6 +35,7 @@ import kotlin.js.JSON as NativeJSON * Client side agent for JSON-RPC remote calls with Spring Boot. */ @Suppress("LargeClass", "TooManyFunctions") +@UseExperimental(ImplicitReflectionSerializer::class) open class SpringRemoteAgent(val serviceManager: SpringServiceManager) : RemoteAgent { val callAgent = CallAgent() -- cgit