Skip to content

Update equals() methods. - #310

Merged
kqarryzada merged 1 commit into
masterfrom
DS-51721-update-equals-methods
Jul 31, 2026
Merged

Update equals() methods.#310
kqarryzada merged 1 commit into
masterfrom
DS-51721-update-equals-methods

Conversation

@kqarryzada

Copy link
Copy Markdown
Collaborator

This commit updates the formatting of equals() methods within the SCIM SDK. The primary benefit of this change is that it results in better unit test code coverage statistics. This change does not include new unit tests, since equality evaluation is exercised much better in other Ping Identity test suites.

This also includes small updates to classes that did not consistently invoke the superclass in both equals() and hashCode().

Reviewer: vyhhuang

JiraIssue: DS-51721

This commit updates the formatting of equals() methods within the SCIM
SDK. The primary benefit of this change is that it results in better
unit test code coverage statistics. This change does not include new
unit tests, since equality evaluation is exercised much better in other
Ping Identity test suites.

This also includes small updates to classes that did not consistently
invoke the superclass in both equals() and hashCode().

Reviewer: vyhhuang

JiraIssue: DS-51721
@kqarryzada
kqarryzada requested a review from vyhhuang July 31, 2026 19:46
@kqarryzada kqarryzada self-assigned this Jul 31, 2026
@@ -832,12 +832,9 @@ public boolean equals(@Nullable final Object o)
{
return true;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could have been folded in with a ternary operator in the return statement, but it wasn't worthwhile in my opinion.

return Objects.equals(valueFilter, element.valueFilter);
return o instanceof Element element
&& Objects.equals(valueFilter, element.valueFilter)
&& attribute.equalsIgnoreCase(element.attribute);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this to equalsIgnoreCase() since it's more efficient.

@vyhhuang vyhhuang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me.

@kqarryzada
kqarryzada merged commit 4905005 into master Jul 31, 2026
6 checks passed
@kqarryzada
kqarryzada deleted the DS-51721-update-equals-methods branch July 31, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants