From 7fd99816b8ef60a2aed51b0c3600a37e359b5f4d Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 22 Feb 2024 14:31:15 +0100 Subject: [PATCH] test: use JsonMapper configure method instead of deprecated configure method (#2722) --- .../jkube/kit/common/AssemblyConfigurationTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jkube-kit/common/src/test/java/org/eclipse/jkube/kit/common/AssemblyConfigurationTest.java b/jkube-kit/common/src/test/java/org/eclipse/jkube/kit/common/AssemblyConfigurationTest.java index f8475fef6b..b49041a697 100644 --- a/jkube-kit/common/src/test/java/org/eclipse/jkube/kit/common/AssemblyConfigurationTest.java +++ b/jkube-kit/common/src/test/java/org/eclipse/jkube/kit/common/AssemblyConfigurationTest.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.json.JsonMapper; import org.apache.commons.io.FileUtils; import org.assertj.core.api.InstanceOfAssertFactories; import org.junit.jupiter.api.Test; @@ -260,8 +261,10 @@ void getFlattenedClone_withInlineAndLayers_shouldReturnInlinesAndInlineLast() { @Test void rawDeserialization() throws IOException { // Given - final ObjectMapper mapper = new ObjectMapper(); - mapper.configure(MapperFeature.USE_ANNOTATIONS, false); + final ObjectMapper mapper = JsonMapper.builder() + .configure(MapperFeature.USE_ANNOTATIONS, false) + .build(); + // When final AssemblyConfiguration result = mapper.readValue( AssemblyConfigurationTest.class.getResourceAsStream("/assembly-configuration.json"),