-
Notifications
You must be signed in to change notification settings - Fork 0
Fix test failures and proper fix this time #18
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
Changes from 1 commit
9cf6c41
1283ff6
3bd6b1c
f1ca39e
28b67b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -655,12 +655,6 @@ internal void InitializeForReflectionSerializer() | |
| private JsonTypeInfo? GetTypeInfoInternal(Type type) | ||
| { | ||
| IJsonTypeInfoResolver? resolver = _effectiveJsonTypeInfoResolver ?? _typeInfoResolver; | ||
|
|
||
| if (resolver == null) | ||
| { | ||
| ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoUsedButTypeInfoResolverNotSet(); | ||
| } | ||
|
|
||
| JsonTypeInfo? info = resolver?.GetTypeInfo(type, this); | ||
|
|
||
| if (info != null) | ||
|
|
@@ -728,6 +722,15 @@ internal void VerifyMutable() | |
| } | ||
| } | ||
|
|
||
| internal void VerifyTypeInfoResolverIsSet() | ||
| { | ||
| IJsonTypeInfoResolver? resolver = _effectiveJsonTypeInfoResolver ?? _typeInfoResolver; | ||
|
||
| if (resolver == null) | ||
| { | ||
| ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoUsedButTypeInfoResolverNotSet(); | ||
| } | ||
| } | ||
|
|
||
| private sealed class ConverterList : ConfigurationList<JsonConverter> | ||
| { | ||
| private readonly JsonSerializerOptions _options; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, could the verification logic live inside
EnsureConfigured? Or could this break other places where configuration is happening?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure this is safe, I think yes but currently this check is not matching all callsites