Migrate to Jackson 3. #298
Conversation
This commit migrates the SCIM SDK from Jackson 2.x APIs to Jackson 3.1.3. The Jackson 3 release made many backwards-incompatible API changes, so it is no longer feasible to support Jackson 2.x further. For this reason, the versions have been updated to 6.0.0-SNAPSHOT. This commit also includes some additional changes. Some are meant for better alignment with Jackson 3.x defaults, and others take advantage of the major version bump. These include the following, with more information available in the CHANGELOG: * Updated the default values of the IGNORE_UNKNOWN_FIELDS and USE_GMT_CALENDARS properties. * Removed the PATCH class and MapperFactory methods that were deprecated in 5.1.0. * Removed "throws ScimException" declarations from methods which no longer throw these exceptions so that application code does not need to surround them with try/catch blocks. Many important updates have been made to the SCIM SDK after the 5.0.0 release was shipped (e.g., bulk requests), so these updates should not be locked behind a Jackson 3 upgrade. For this reason, this commit was not included with the changes that shipped in 5.1.0. Instead, this commit will be shipped as part of a "focused" 6.0.0 release. Reviewer: dougbulkley Reviewer: vyhhuang JiraIssue: DS-51372
kqarryzada
left a comment
There was a problem hiding this comment.
I left a few comments with some background. I was intending to add some more, but GitHub has an active issue right now causing high volumes of inline comment failures.
| */ | ||
| @JsonAnySetter | ||
| protected void setAny(@NotNull final String key, | ||
| @NotNull final JsonNode ignoredValue) |
There was a problem hiding this comment.
The setAny() methods are not needed on the bulk classes since these are always ignored in Jackson 3.x now. This was originally placed here for better consistency in 5.1.0.
| * and deserializing SCIM JSON objects. | ||
| */ | ||
| @NotNull | ||
| public static JsonMapper createObjectMapper() |
There was a problem hiding this comment.
JsonMapper is a subclass of ObjectMapper, so the following still works. I didn't want to force applications to update this.
ObjectMapper mapper = JsonUtils.createObjectMapper();| "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], | ||
| "totalResults": 0, | ||
| "Resources": [] | ||
| }"""; |
There was a problem hiding this comment.
During validation, I thought this behavior might have regressed in the SCIM SDK. It didn't, but there didn't seem to be a test to prove it, so I added this in.
dougbulkley
left a comment
There was a problem hiding this comment.
Jut downloaded this branch and verified it would build and the tests was successful.
504a338 to
0861297
Compare
vyhhuang
left a comment
There was a problem hiding this comment.
These changes look good to me.
This commit migrates the SCIM SDK from Jackson 2.x APIs to Jackson
3.1.3. The Jackson 3 release made many backwards-incompatible API
changes, so it is no longer feasible to support Jackson 2.x further.
For this reason, the versions have been updated to 6.0.0-SNAPSHOT.
This commit also includes some additional changes. Some are meant for
better alignment with Jackson 3.x defaults, and others take advantage of
the major version bump. These include the following, with more
information available in the CHANGELOG:
USE_GMT_CALENDARS properties.
in 5.1.0.
longer throw these exceptions so that application code does not need
to surround them with try/catch blocks.
Many important updates have been made to the SCIM SDK after the 5.0.0
release was shipped (e.g., bulk requests), so these updates should not
be locked behind a Jackson 3 upgrade. For this reason, this commit was
not included with the changes that shipped in 5.1.0. Instead, this
commit will be shipped as part of a "focused" 6.0.0 release.
Reviewer: dougbulkley
Reviewer: vyhhuang
JiraIssue: DS-51372
Resolves #278