Skip to content

fix: make SimpleConfigObject.keySet() unmodifiable#848

Open
SAY-5 wants to merge 1 commit into
lightbend:mainfrom
SAY-5:fix/keyset-immutable
Open

fix: make SimpleConfigObject.keySet() unmodifiable#848
SAY-5 wants to merge 1 commit into
lightbend:mainfrom
SAY-5:fix/keyset-immutable

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 12, 2026

ConfigObject is documented as immutable, but keySet() returned the backing map's live key set, which allows element removal that mutates the object. Wrap it in Collections.unmodifiableSet. Closes #819.

@lightbend-cla-validator
Copy link
Copy Markdown
Collaborator

Hi @SAY-5,

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:

https://contribute.akka.io/contribute/cla

@johanandren
Copy link
Copy Markdown
Collaborator

Thanks! Change looks good but we need a CLA sign to be able to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConfigObject is not immutable - can mutate through keySet()

3 participants