Skip to content

Do not mutate config.Fallback values when building Root property #197

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

Merged
merged 1 commit into from
Jan 24, 2020

Conversation

IgorFedchenko
Copy link
Contributor

Close #193

@@ -64,7 +64,7 @@ public virtual HoconValue Root
get
{
var elements = new List<IHoconElement>();
for (var config = this; config != null; config = config.Fallback)
for (var config = this; config != null; config = config.Fallback?.Copy())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow... that was an easy fix.

@Aaronontheweb Aaronontheweb merged commit 506c709 into akkadotnet:dev Jan 24, 2020
Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@IgorFedchenko IgorFedchenko deleted the fix/tostring-mutation branch January 24, 2020 15:46
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.

[CRITICAL] Fallbacks are mutable during traversal
2 participants