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

fix: use SplayTreeSet to resolve inconsistent hashCode #142

Merged
merged 5 commits into from Aug 19, 2022

Conversation

devmil
Copy link
Contributor

@devmil devmil commented Jul 28, 2022

Fixes #141

Status

READY

Breaking Changes

NO

Description

This fixes the inconsistent hashCode behaviour for Sets by using a SplayTreeSet to ensure a consistent iteration order.

Todos

  • Tests
  • Documentation
  • Examples

Steps to Test or Reproduce

See #141

Impact to Remaining Code Base

None known

@felangel felangel added the bug Something isn't working label Aug 18, 2022
@felangel felangel changed the title uses SplayTreeSet to be independent of the insertion order of a Set fix: use SplayTreeSet to resolve inconsistent hashCode Aug 18, 2022
Co-authored-by: Felix Angelov <felangelov@gmail.com>
@devmil devmil requested a review from felangel August 18, 2022 04:39
@devmil devmil removed their assignment Aug 18, 2022
@felangel
Copy link
Owner

@devmil thanks for the contribution! I’ll merge and publish this tomorrow 👍

@felangel felangel merged commit eb18291 into felangel:master Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Equality and Hashcode differ for Sets with different order
2 participants