Skip to content

Conversation

therepanic
Copy link
Contributor

Closes: #15156

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 4, 2025
@@ -73,6 +73,23 @@ public Map<String, Object> getClaims() {
return this.claims;
}

@Override
public boolean equals(Object obj) {
if (this == obj) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think pattern matching can be applied here

if (obj instanceof OidcIdToken that) {
	return this.claims.equals(that.claims);
}

return false;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think there's any point in that. You can implement the method in different ways, but make it perform the same task. I copied and polished these methods from a neighboring class, so I don't think anything needs to be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should OidcIdToken implement equals?
3 participants