-
Notifications
You must be signed in to change notification settings - Fork 42
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
fix: equals and hashcode of several classes #1364
Conversation
Signed-off-by: christian.lutnik <[email protected]>
Signed-off-by: christian.lutnik <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the issue so promptly, appreciate it! 👍
|
||
@Test | ||
void unequalMutableStructuresAreNotEqual() { | ||
MutableStructure m1 = new MutableStructure(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment: the MutableStructure tests are in ImmutableStructureTest
. Should they be moved into a separate class?
Perhaps in a separate PR could we address the
@tostring(callSuper = true) generates what we want |
# Conflicts: # src/main/java/dev/openfeature/sdk/ImmutableMetadata.java
Signed-off-by: christian.lutnik <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1364 +/- ##
============================================
+ Coverage 92.80% 93.34% +0.53%
- Complexity 468 472 +4
============================================
Files 43 43
Lines 1126 1127 +1
Branches 90 91 +1
============================================
+ Hits 1045 1052 +7
+ Misses 53 48 -5
+ Partials 28 27 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: christian.lutnik <[email protected]>
Signed-off-by: christian.lutnik <[email protected]>
|
This PR
Fixes some of the
equals
andhashcode
methods in the sdk.Related Issues
Fixes #1362
Notes
I assumed that for the classes I modified, two objects should be equal iff their underlying data is equal. E.g. the class
Value
. Two distinctValue
objects should be equal if they represent the same data:Please comment if you think there are more such cases in the sdk, or if I added this behavior somewhere it is not appropriate.