Skip to content

Commit f4dff13

Browse files
committed
Replace the non-custom mapper with defaultMapper
1 parent 2e43611 commit f4dff13

File tree

1 file changed

+2
-4
lines changed
  • src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github

1 file changed

+2
-4
lines changed

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/GitHub844.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.fasterxml.jackson.module.kotlin.test.github
22

33
import com.fasterxml.jackson.annotation.JsonTypeInfo
4-
import com.fasterxml.jackson.databind.ObjectMapper
4+
import com.fasterxml.jackson.module.kotlin.defaultMapper
55
import com.fasterxml.jackson.module.kotlin.readValue
6-
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
76
import org.junit.jupiter.api.Test
87
import kotlin.test.assertEquals
98

@@ -22,8 +21,7 @@ class GitHub844 {
2221
}
2322
"""
2423

25-
val jacksonObjectMapper = ObjectMapper().registerKotlinModule()
26-
val message = jacksonObjectMapper.readValue<BaseClass>(json)
24+
val message = defaultMapper.readValue<BaseClass>(json)
2725

2826
assertEquals(ChildClass("Test"), message)
2927
}

0 commit comments

Comments
 (0)