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 21
21
package io.temporal.common.converter
22
22
23
23
import com.fasterxml.jackson.databind.ObjectMapper
24
- import com.fasterxml.jackson.module.kotlin.KotlinModule
24
+ import com.fasterxml.jackson.module.kotlin.registerKotlinModule
25
25
26
26
class KotlinObjectMapperFactory {
27
27
companion object {
28
28
@JvmStatic
29
29
fun new (): ObjectMapper {
30
30
val mapper = JacksonJsonPayloadConverter .newDefaultObjectMapper()
31
31
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()
42
33
}
43
34
}
44
35
}
You can’t perform that action at this time.
0 commit comments