diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-11-06 18:38:41 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-11-06 18:38:41 +0100 |
commit | de3007e68ea7ee3793143816f8430703ee82fadb (patch) | |
tree | 71c50bebc184ddabf88bfe9a312cd85873dff683 /kvision-modules | |
parent | bbc623f8caa146089dfaa293fdb1438bcb48db3c (diff) | |
download | kvision-de3007e68ea7ee3793143816f8430703ee82fadb.tar.gz kvision-de3007e68ea7ee3793143816f8430703ee82fadb.tar.bz2 kvision-de3007e68ea7ee3793143816f8430703ee82fadb.zip |
Fix parameters deserialialization
Diffstat (limited to 'kvision-modules')
3 files changed, 6 insertions, 4 deletions
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt index d81dc7a7..df8d20c7 100644 --- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt +++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt @@ -23,6 +23,7 @@ package pl.treksoft.kvision.remote import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue import com.google.inject.Injector import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Dispatchers @@ -528,7 +529,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass: if (T::class == String::class) { str as T } else { - mapper.readValue(str, T::class.java) + mapper.readValue(str) } } ?: null as T } diff --git a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt index 62ce4f0c..8b766aee 100644 --- a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt +++ b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt @@ -23,6 +23,7 @@ package pl.treksoft.kvision.remote import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue import io.ktor.application.ApplicationCall import io.ktor.application.call import io.ktor.http.cio.websocket.CloseReason @@ -563,7 +564,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass: if (T::class == String::class) { str as T } else { - mapper.readValue(str, T::class.java) + mapper.readValue(str) } } ?: null as T } diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt index 17451461..8008d529 100644 --- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt +++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt @@ -23,6 +23,7 @@ package pl.treksoft.kvision.remote import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.Channel @@ -49,7 +50,6 @@ import java.time.OffsetDateTime import java.time.OffsetTime import kotlin.reflect.KClass - /** * Multiplatform service manager for Spring Boot. */ @@ -640,7 +640,7 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass: if (T::class == String::class) { str as T } else { - mapper.readValue(str, T::class.java) + mapper.readValue(str) } } ?: null as T } |