Modernize CaseIgnoreObjectNode usages. #302
Merged
Merged
Conversation
kqarryzada
commented
Jun 18, 2026
| private record CaseIgnoreKey(@NotNull String key) | ||
| { | ||
| @NotNull | ||
| private final String key; |
Collaborator
Author
There was a problem hiding this comment.
I opted to use records for these internal classes to reduce boiler plate.
| */ | ||
| @Override | ||
| @Nullable | ||
| public JsonNode findValue(@NotNull final String fieldName) |
Collaborator
Author
There was a problem hiding this comment.
Jackson helpfully routes calls like this to the plural variant and returns the first result, so the explicit method override is not needed. It's a tradeoff between maintainability and performance (i.e., walking the whole tree), but I don't think there's that much overhead with this approach.
kqarryzada
force-pushed
the
DS-51630-update-CaseIgnoreObjectNode
branch
from
June 18, 2026 18:39
c9d4c46 to
5607560
Compare
kqarryzada
commented
Jun 18, 2026
| } | ||
| } | ||
| return localFoundSoFar; | ||
| List<JsonNode> parsed = findParents(propertyName, null) |
Collaborator
Author
There was a problem hiding this comment.
These explicitly pass null to call our method directly instead of relying on Jackson to do it.
vyhhuang
approved these changes
Jun 18, 2026
vyhhuang
left a comment
Collaborator
There was a problem hiding this comment.
These changes look good to me.
kqarryzada
force-pushed
the
DS-51630-update-CaseIgnoreObjectNode
branch
from
June 18, 2026 21:11
5607560 to
0518c70
Compare
This commit primarily updates CaseIgnoreObjectNode to be more aligned with the most recent version of ObjectNode.java from Jackson. These changes were focused on maintainability by leveraging more code re-use. Additionally, case-insensitive evaluations have been updated to use equalsIgnoreCase() where possible, for better performance. This also enforces the use of a CaseIgnoreObjectNode within the GenericScimResource class to ensure that these resources always use case-insensitive fields. This commit uncovered a defect where the fields would not be treated correctly if a standard ObjectNode was provided to the constructor. This issue has now been fixed. Reviewer: dougbulkley Reviewer: vyhhuang JiraIssue: DS-51630
kqarryzada
force-pushed
the
DS-51630-update-CaseIgnoreObjectNode
branch
from
June 18, 2026 21:21
0518c70 to
70b3352
Compare
dougbulkley
approved these changes
Jun 18, 2026
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.
This commit primarily updates CaseIgnoreObjectNode to be more aligned
with the most recent version of ObjectNode.java from Jackson. These
changes were focused on maintainability by leveraging more code re-use.
Additionally, case-insensitive evaluations have been updated to use
equalsIgnoreCase() where possible, for better performance.
This also enforces the use of a CaseIgnoreObjectNode within the
GenericScimResource class to ensure that these resources always use
case-insensitive fields. This commit uncovered a defect where the
fields would not be treated correctly if a standard ObjectNode was
provided to the constructor. This issue has now been fixed.
Reviewer: dougbulkley
Reviewer: vyhhuang
JiraIssue: DS-51630