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(dotnet): stop mutating Dictionary when iterating on it #691

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

RomainMuller
Copy link
Contributor

When bringding callback results into dotnet types, we used to modify the
Dictionary item within the loop, which is illegal in C#. Any mutation on
the collection will cause the iterator to abort.

Insead, create a new Dictionary and add the resolved values to that.

Fixes #690


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

When bringding callback results into dotnet types, we used to modify the
Dictionary item within the loop, which is illegal in C#. Any mutation on
the collection will cause the iterator to abort.

Insead, create a new Dictionary and add the resolved values to that.

Fixes #690
@RomainMuller RomainMuller requested review from assyadh, costleya and a team as code owners August 8, 2019 23:12
@RomainMuller RomainMuller merged commit 8aedfc9 into master Aug 9, 2019
@RomainMuller RomainMuller deleted the rmuller/fix-690 branch August 9, 2019 17:11
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.

CfnDistribution_ throws 'Collection was modified'
2 participants