From 59a3d53276dbcfc0a04abd244201726e6f8b6efb Mon Sep 17 00:00:00 2001 From: Brutus5000 Date: Fri, 22 Nov 2024 23:19:12 +0100 Subject: [PATCH] Replace Jackson KotlinModule with builder --- .../kotlin/com/faforever/commons/lobby/LobbyClientTest.kt | 5 ++++- .../kotlin/com/faforever/commons/lobby/ServerMessageTest.kt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lobby/src/test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt b/lobby/src/test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt index 3b623ece..c255ecc1 100644 --- a/lobby/src/test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt +++ b/lobby/src/test/kotlin/com/faforever/commons/lobby/LobbyClientTest.kt @@ -47,7 +47,10 @@ class LobbyClientTest { } } - private val objectMapper: ObjectMapper = ObjectMapper().registerModule(KotlinModule()).registerModule(JavaTimeModule()).disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).enable(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE); + private val objectMapper: ObjectMapper = + ObjectMapper().registerModule(KotlinModule.Builder().build()).registerModule(JavaTimeModule()) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE); private val token = "abc" private val serverReceivedSink = Sinks.many().unicast().onBackpressureBuffer() private val serverMessagesReceived = serverReceivedSink.asFlux().publish().autoConnect() diff --git a/lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt b/lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt index 4ea53ea4..3394c139 100644 --- a/lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt +++ b/lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt @@ -17,7 +17,7 @@ class ServerMessageTest { companion object { val objectMapper: ObjectMapper = ObjectMapper() - .registerModule(KotlinModule()) + .registerModule(KotlinModule.Builder().build()) .registerModule(JavaTimeModule()) .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) }