-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
PowerSet.equals depends on set's iteration order #3890
Milestone
Comments
Wow, almost 7 years old! Nice find. |
Thanks! 😁 |
Merged
nick-someone
pushed a commit
that referenced
this issue
May 4, 2020
…are the same, but in a different iteration order. RELNOTES: Fix issue where PowerSet.equals(PowerSet) would erroneously return false if the PowerSet's underlying Sets were equal, but in a different iteration order. Fixes #3891, #3890 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=309745434
nick-someone
pushed a commit
that referenced
this issue
May 4, 2020
…are the same, but in a different iteration order. RELNOTES: Fix issue where PowerSet.equals(PowerSet) would erroneously return false if the PowerSet's underlying Sets were equal, but in a different iteration order. Fixes #3891, #3890 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=309745434
👍👍👍👍😀😀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If
com.google.common.collect.Sets.powerSet
is called with two different sets that contain the same elements but in a different iteration order, the returned power sets will also contain the same elements but in a different iteration order. Therefore,Set.equals
on those power sets istrue
, butcom.google.common.collect.Sets.PowerSet.equals
incorrectly returnsfalse
.The text was updated successfully, but these errors were encountered: