You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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
The text was updated successfully, but these errors were encountered: