Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserProfile equals() does not return true when objects are equal #966

Closed
jfb-NRB opened this issue Dec 18, 2023 · 1 comment
Closed

UserProfile equals() does not return true when objects are equal #966

jfb-NRB opened this issue Dec 18, 2023 · 1 comment
Assignees

Comments

@jfb-NRB
Copy link

jfb-NRB commented Dec 18, 2023

Describe the bug?

Create two UserProfile objects with the same content and call the equals method. The method returns false.

What is expected to happen?

The equals method must return true.

What is the actual behavior?

The equals method returns false.

Reproduction Steps?

Create two UserProfile objects with the same content and call the equals method.

Additional Information?

In the equals method in UserProfile, the last line calls the equals method of the super object super.equals(o) which is the equals method of the Object class that returns true only if it's the same instance of UserProfile. This line needs to be removed!

Java Version

java version 14

SDK Version

13.0.2 and 14.0.0

OS version

No response

@jfb-NRB jfb-NRB added the bug label Dec 18, 2023
@arvindkrishnakumar-okta
Copy link
Contributor

@jfb-NRB Thanks for posting! Will address this.

@arvindkrishnakumar-okta arvindkrishnakumar-okta changed the title The equals method in UserProfile does not return true when objects are equal. UserProfile equals() does not return true when objects are equal Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants