Enable nullability in SendKeys#6428
Merged
dreddy-work merged 1 commit intodotnet:mainfrom Jan 4, 2022
Merged
Conversation
RussKie
reviewed
Jan 6, 2022
| try | ||
| { | ||
| eventsTotal = s_events.Count; | ||
| eventsTotal = s_events!.Count; |
Contributor
There was a problem hiding this comment.
I find this rather unsettling. The code is rather convoluted and I couldn't confirm that we would have called AddEvent() before getting here. So instead of using a ! it probably would be more correct to check s_events for null and exit, if it is so.
Contributor
Author
There was a problem hiding this comment.
Since this was already merged, I created #6470.
Danil-Andrianov
pushed a commit
to Danil-Andrianov/winforms
that referenced
this pull request
Jan 10, 2022
dreddy-work
reviewed
Jan 12, 2022
| /// Vector of events that we have yet to post to the journaling hook. | ||
| /// </summary> | ||
| private static Queue<SKEvent> s_events; | ||
| private static Queue<SKEvent>? s_events; |
Member
There was a problem hiding this comment.
Ia right fix seems to be making this as a readonly assignment and make it non nullable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Microsoft Reviewers: Open in CodeFlow