Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix stack overflow condition when appending modifiers to resolver chains. #112737

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 3 commits into from
Feb 21, 2025

Conversation

eiriktsarpalis
Copy link
Member

Fix #112735.

@Copilot Copilot AI review requested due to automatic review settings February 20, 2025 13:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/OptionsTests.cs:1423

  • [nitpick] The test verifies that the modifier is invoked for a type not present in JsonContext.Default. It might be beneficial to also include a test case covering the behavior when a type is handled by the original resolver to ensure complete coverage.
options.TypeInfoResolver = options.TypeInfoResolver!.WithAddedModifier(_ => isModifierInvoked = true);

@stephentoub stephentoub merged commit 488b948 into dotnet:main Feb 21, 2025
80 of 83 checks passed
@eiriktsarpalis eiriktsarpalis deleted the fix/stj-typeinforesolverchain branch February 21, 2025 09:48
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[System.Text.Json] Stack Overflow when appending modifiers to TypeInfoResolverChain
2 participants