diff --git a/cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/BiggerDataTest.java b/cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/BiggerDataTest.java index 6273a759b..24f1a2dc9 100644 --- a/cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/BiggerDataTest.java +++ b/cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/BiggerDataTest.java @@ -3,6 +3,7 @@ import java.util.*; import tools.jackson.databind.*; +import tools.jackson.databind.json.JsonMapper; import tools.jackson.dataformat.cbor.CBORTestBase; import tools.jackson.dataformat.cbor.CBORWriteFeature; import tools.jackson.dataformat.cbor.databind.CBORMapper; @@ -80,9 +81,13 @@ static class Area { /********************************************************** */ + private final ObjectMapper MAPPER = JsonMapper.builder() + .disable(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES) + .build(); + public void testReading() throws Exception { - Citm citm0 = jsonMapper().readValue(getClass().getResourceAsStream("/data/citm_catalog.json"), + Citm citm0 = MAPPER.readValue(getClass().getResourceAsStream("/data/citm_catalog.json"), Citm.class); ObjectMapper mapper = cborMapper(); @@ -112,7 +117,7 @@ public void testReading() throws Exception public void testRoundTrip() throws Exception { - Citm citm0 = jsonMapper().readValue(getClass().getResourceAsStream("/data/citm_catalog.json"), + Citm citm0 = MAPPER.readValue(getClass().getResourceAsStream("/data/citm_catalog.json"), Citm.class); ObjectMapper mapper = cborMapper(); byte[] cbor = mapper.writeValueAsBytes(citm0); @@ -140,7 +145,7 @@ public void testRoundTrip() throws Exception public void testRoundTripStringref() throws Exception { - Citm citm0 = jsonMapper().readValue(getClass().getResourceAsStream("/data/citm_catalog.json"), + Citm citm0 = MAPPER.readValue(getClass().getResourceAsStream("/data/citm_catalog.json"), Citm.class); ObjectMapper mapper = new CBORMapper( cborFactoryBuilder().enable(CBORWriteFeature.STRINGREF).build()); diff --git a/smile/src/test/java/tools/jackson/dataformat/smile/mapper/BiggerDataParseTest.java b/smile/src/test/java/tools/jackson/dataformat/smile/mapper/BiggerDataParseTest.java index a16249254..c1bb31ad1 100644 --- a/smile/src/test/java/tools/jackson/dataformat/smile/mapper/BiggerDataParseTest.java +++ b/smile/src/test/java/tools/jackson/dataformat/smile/mapper/BiggerDataParseTest.java @@ -80,7 +80,9 @@ static class Area { /********************************************************** */ - private final ObjectMapper JSON_MAPPER = new JsonMapper(); + private final ObjectMapper JSON_MAPPER = JsonMapper.builder() + .disable(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES) + .build(); public void testReading() throws Exception {