Skip to content

Commit f1963b9

Browse files
committed
Fix #872 for master too
1 parent e6c9fec commit f1963b9

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/main/kotlin/tools/jackson/module/kotlin/Converters.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ internal object KotlinToJavaDurationConverter : StdConverter<KotlinDuration, Jav
3434
/**
3535
* Currently it is not possible to deduce type of [kotlin.time.Duration] fields therefore explicit annotation is needed on fields in order to properly deserialize POJO.
3636
*
37-
* @see [com.fasterxml.jackson.module.kotlin.test.DurationTests]
37+
* @see [tools.jackson.module.kotlin.test.DurationTests]
3838
*/
3939
internal object JavaToKotlinDurationConverter : StdConverter<JavaDuration, KotlinDuration>() {
4040
override fun convert(value: JavaDuration) = value.toKotlinDuration()

src/test/kotlin/tools/jackson/module/kotlin/test/github/GitHub757.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.fasterxml.jackson.module.kotlin.test.github
1+
package tools.jackson.module.kotlin.test.github
22

33
import tools.jackson.databind.json.JsonMapper
44
import tools.jackson.module.kotlin.KotlinFeature

src/test/kotlin/tools/jackson/module/kotlin/test/github/GitHub832.kt

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

33
import com.fasterxml.jackson.annotation.JsonAnyGetter
44
import com.fasterxml.jackson.annotation.JsonAnySetter
5-
import com.fasterxml.jackson.databind.ObjectMapper
6-
import com.fasterxml.jackson.module.kotlin.KotlinModule
7-
import com.fasterxml.jackson.module.kotlin.readValue
5+
import tools.jackson.databind.ObjectMapper
6+
import tools.jackson.module.kotlin.KotlinModule
7+
import tools.jackson.module.kotlin.readValue
88
import org.junit.jupiter.api.Test
9+
import tools.jackson.databind.json.JsonMapper
910
import kotlin.test.assertEquals
1011

1112
class GitHub832 {
@@ -24,9 +25,10 @@ class GitHub832 {
2425
"debug": "on"
2526
}
2627
} """.trimMargin()
27-
val jacksonMapper = ObjectMapper()
28-
jacksonMapper.registerModules(KotlinModule.Builder().build())
29-
val anySetter = jacksonMapper.readValue<AnySetter>(json)
28+
val mapper = JsonMapper.builder()
29+
.addModule(KotlinModule.Builder().build())
30+
.build()
31+
val anySetter = mapper.readValue<AnySetter>(json)
3032
assertEquals("widget", anySetter.anything.entries.first().key)
3133
}
3234
}

0 commit comments

Comments
 (0)