Closed
Conversation
4dd8a69 to
253340f
Compare
(test begin to fail with `Unrecognized field "type" (class io.intercom.api.TypedData), not marked as ignorable (0 known properties: ])`)
7b75d33 to
790084b
Compare
Owner
Author
|
According to this, Intercom Java SDK will not be updated
|
Owner
Author
|
Despite the above information, there now seems to be an upgrade to the official repository which upgrades jackson-databind to 2.17.2: Therefore, I'm closing this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Issue:
As described in the linked issue, if another dependency has Jackson as a transitive dependency and causes it to be updated to >2.15 in a project, then the Intercom
HttpClient.readEntitymethod breaks (it begins to throw Jackson DatabindUnrecognizedPropertyExceptions at runtime).This PR attempts to upgrade the Jackson dependency of intercom-java & then fix the
ObjectMapperas necessary.See also:
How?
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "type" (class io.intercom.api.TypedData), not marked as ignorable (0 known properties: ])ObjectMapper:ObjectMapperconfigurations toMapperSupportso that it will (once again, as in older versions of Jackson) ignore any uncrecognized properties.FAIL_ON_UNKNOWN_PROPERTIESto falsecom.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class io.intercom.api.TypedData and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: io.intercom.api.User["companies"]FAIL_ON_EMPTY_BEANSto falsejava.lang.ClassCastException: io.intercom.api.TypedData cannot be cast to io.intercom.api.Segment.It seems that something breaks the serialization of nested fields that are collections, such as
tagsandsegments:should be: