Skip to content

Commit

Permalink
fixed deprecated method usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Swaminathan11 committed Jan 11, 2024
1 parent 7956212 commit e11059d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -260,8 +261,7 @@ 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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.Collections;
import java.util.stream.Stream;

import com.fasterxml.jackson.databind.json.JsonMapper;
import org.assertj.core.api.Assertions;
import org.eclipse.jkube.kit.common.AssemblyConfiguration;

Expand Down Expand Up @@ -234,8 +235,7 @@ void getAssembly_withAssembly_shouldReturnAssembly() {
@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 BuildConfiguration result = mapper.readValue(
BuildConfigurationTest.class.getResourceAsStream("/build-configuration.json"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import org.junit.jupiter.api.Test;

import java.io.IOException;
Expand All @@ -28,8 +29,7 @@ class IngressConfigTest {
@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 IngressConfig result = mapper.readValue(
IngressConfigTest.class.getResourceAsStream("/ingress-config.json"),
Expand Down

0 comments on commit e11059d

Please sign in to comment.