Skip to content

Commit c3254d5

Browse files
committed
Stop using deprecated Jackson methods
1 parent 7e5e3b4 commit c3254d5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/src/main/java/io/cucumber/messages/cli/Jackson.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
import io.cucumber.messages.NdjsonToMessageIterable;
1414
import io.cucumber.messages.types.Envelope;
1515

16+
import static com.fasterxml.jackson.annotation.JsonInclude.Value.construct;
1617

1718
final class Jackson {
1819

1920
static final JsonMapper OBJECT_MAPPER = JsonMapper.builder()
2021
.addModule(new Jdk8Module())
2122
.addModule(new ParameterNamesModule(Mode.PROPERTIES))
22-
.serializationInclusion(Include.NON_ABSENT)
23+
.defaultPropertyInclusion(construct(
24+
Include.NON_ABSENT,
25+
Include.NON_ABSENT))
2326
.constructorDetector(ConstructorDetector.USE_PROPERTIES_BASED)
2427
.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)
2528
.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING)

0 commit comments

Comments
 (0)