File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
temporal-kotlin/src/main/kotlin/io/temporal/common/converter Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 2121package io.temporal.common.converter
2222
2323import com.fasterxml.jackson.databind.ObjectMapper
24- import com.fasterxml.jackson.module.kotlin.KotlinModule
24+ import com.fasterxml.jackson.module.kotlin.registerKotlinModule
2525
2626class KotlinObjectMapperFactory {
2727 companion object {
2828 @JvmStatic
2929 fun new (): ObjectMapper {
3030 val mapper = JacksonJsonPayloadConverter .newDefaultObjectMapper()
3131
32- val km = try {
33- KotlinModule .Builder ()
34- .build()
35- } catch (e: NoClassDefFoundError ) {
36- // use deprecated constructor as fallback
37- @Suppress(" deprecation" )
38- KotlinModule ()
39- }
40- mapper.registerModule(km)
41- return mapper
32+ return mapper.registerKotlinModule()
4233 }
4334 }
4435}
You can’t perform that action at this time.
0 commit comments