-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Annotate System.Text.Json for nullable #114
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
a649816
5015584
44d82fd
3a7254b
6917d64
150691f
0ab2dd6
8459413
ea28014
9d735b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ namespace System.Text.Json | |
| public class JsonException : Exception | ||
| { | ||
| // Allow the message to mutate to avoid re-throwing and losing the StackTrace to an inner exception. | ||
| private string? _message; | ||
| internal string? _message; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the nullablility flow changing this from private to internal?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is kind of a long story. Exception.Message getter shouldn't be nullable (contract) so we changed the getter from |
||
|
|
||
| /// <summary> | ||
| /// Creates a new exception object to relay error information to the user. | ||
|
|
@@ -134,7 +134,7 @@ public override string Message | |
| { | ||
| get | ||
| { | ||
| return _message!; | ||
| return _message ?? base.Message; | ||
| } | ||
| } | ||
|
|
||
|
|
||
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.
Changes to the
Utf8JsonWriterand related types look good.