Skip to content

Commit

Permalink
refactor: replace Object.mapper.configure with JsonMapper.builder.con…
Browse files Browse the repository at this point in the history
  • Loading branch information
anglerfishlyy authored Apr 19, 2024
1 parent 4838b26 commit e7800b9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

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 org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
Expand Down Expand Up @@ -120,8 +122,7 @@ void builder() {
@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 JKubeConfiguration result = mapper.readValue(
JKubeConfigurationTest.class.getResourceAsStream("/jkube-configuration.json"),
Expand Down

0 comments on commit e7800b9

Please sign in to comment.