Repository navigation
fix : ConfigObject.values() dropping entries with equal values - #877
Merged
Merged
Conversation
SimpleConfigObject#values() wrapped the backing map's values in a HashSet. Since AbstractConfigValue#equals()/hashCode() intentionally ignore origin and compare only type + unwrapped value, any two entries whose values happened to be equal (e.g. a=1, b=1) silently collapsed into one, breaking the java.util.Map contract that values().size() == size(). Return a plain ArrayList instead, matching the semantics of entrySet()/keySet(), and add a regression test covering duplicate values. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
|
Hi @souzataniya, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Akka Contributors License Agreement: |
Contributor
Author
|
I have signed the CLA @lightbend-cla-validator |
johanandren
reviewed
Oct 6, 2026
johanandren
approved these changes
Oct 6, 2026
This was referenced Oct 11, 2026
2 of 16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
values() used a HashSet, which dedups by value equality (origin/key ignored). So {a=1, b=1, c=2} returned only 2 values instead of 3, breaking the Map contract. Switched to ArrayList, added a regression test.