Skip to content

Commit 618eb6b

Browse files
committed
Use plain JsonMapper in JsonIoSpec
1 parent 1245a40 commit 618eb6b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

webauthn-server-core/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies {
2626
testImplementation(platform(project(":test-platform")))
2727
testImplementation(project(":yubico-util-scala"))
2828
testImplementation("com.fasterxml.jackson.core:jackson-databind")
29+
testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8")
2930
testImplementation("com.upokecenter:cbor")
3031
testImplementation("junit:junit")
3132
testImplementation("org.bouncycastle:bcpkix-jdk18on")

webauthn-server-core/src/test/scala/com/yubico/webauthn/data/JsonIoSpec.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ package com.yubico.webauthn.data
2727
import com.fasterxml.jackson.core.`type`.TypeReference
2828
import com.fasterxml.jackson.databind.ObjectMapper
2929
import com.fasterxml.jackson.databind.exc.ValueInstantiationException
30+
import com.fasterxml.jackson.databind.json.JsonMapper
3031
import com.fasterxml.jackson.databind.node.BooleanNode
3132
import com.fasterxml.jackson.databind.node.ObjectNode
3233
import com.fasterxml.jackson.databind.node.TextNode
34+
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module
3335
import com.yubico.internal.util.JacksonCodecs
3436
import com.yubico.webauthn.AssertionRequest
3537
import com.yubico.webauthn.AssertionResult
@@ -55,7 +57,11 @@ class JsonIoSpec
5557
with Matchers
5658
with ScalaCheckDrivenPropertyChecks {
5759

58-
def json: ObjectMapper = JacksonCodecs.json()
60+
val json: ObjectMapper =
61+
JsonMapper
62+
.builder()
63+
.addModule(new Jdk8Module())
64+
.build()
5965

6066
describe("The class") {
6167

0 commit comments

Comments
 (0)