Skip to content

Commit

Permalink
test: use JsonMapper configure method instead of deprecated configure…
Browse files Browse the repository at this point in the history
… method (#2722)
  • Loading branch information
ajayl83 authored Feb 22, 2024
1 parent fddd604 commit 7fd9981
Showing 1 changed file with 5 additions and 2 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,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"),
Expand Down

0 comments on commit 7fd9981

Please sign in to comment.