Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Upgrade Jackson dependencies to v2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kishorebanala committed Oct 15, 2019
1 parent 56ebccb commit 8237ded
Show file tree
Hide file tree
Showing 21 changed files with 9,415 additions and 59,242 deletions.
4,578 changes: 570 additions & 4,008 deletions cassandra-persistence/dependencies.lock

Large diffs are not rendered by default.

3,739 changes: 387 additions & 3,352 deletions client/dependencies.lock

Large diffs are not rendered by default.

911 changes: 36 additions & 875 deletions common/dependencies.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.io.IOException;

public class JsonMapperProvider implements Provider<ObjectMapper> {

public JsonMapperProvider() {}

/**
Expand Down Expand Up @@ -111,11 +112,11 @@ public Any deserialize(JsonParser p, DeserializationContext ctxt)
JsonNode value = root.get(JSON_VALUE);

if (type == null || !type.isTextual()) {
throw ctxt.reportMappingException("invalid '@type' field when deserializing ProtoBuf Any object");
ctxt.reportMappingException("invalid '@type' field when deserializing ProtoBuf Any object");
}

if (value == null || !value.isTextual()) {
throw ctxt.reportMappingException("invalid '@value' field when deserializing ProtoBuf Any object");
ctxt.reportMappingException("invalid '@value' field when deserializing ProtoBuf Any object");
}

return Any.newBuilder()
Expand All @@ -138,8 +139,7 @@ public ObjectMapper get() {
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.configure(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, false);
objectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
objectMapper.setDefaultPropertyInclusion(JsonInclude.Value.construct(JsonInclude.Include.NON_NULL, JsonInclude.Include.ALWAYS));
objectMapper.registerModule(new JsonProtoModule());
return objectMapper;
}
Expand Down
Loading

0 comments on commit 8237ded

Please sign in to comment.