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

Nullability annotations for HttpListener #41189

Merged
merged 3 commits into from
Aug 26, 2020

Conversation

pgovind
Copy link

@pgovind pgovind commented Aug 21, 2020

Prashanth Govindarajan added 2 commits August 21, 2020 15:33
@ghost
Copy link

ghost commented Aug 21, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@pgovind pgovind requested a review from aik-jahoda August 24, 2020 19:01
Copy link
Contributor

@aik-jahoda aik-jahoda left a comment

Choose a reason for hiding this comment

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

Added few comments.

byte[] buffer = _memoryStream.GetBuffer();
int length = (int)_memoryStream.Length;
byte[] buffer = _memoryStream!.GetBuffer();
int length = (int)_memoryStream!.Length;
_memoryStream = null;
Copy link
Member

@carlossanlop carlossanlop Aug 25, 2020

Choose a reason for hiding this comment

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

@aik-jahoda shouldn't we call _memoryStream.Dispose() here? I find it weird that it is being set to null.

I ask because this is what forced Prashanth to make _memoryStream nullable.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't change behaviour now but create follow up work for .NET 6. I'm fine with nullable _memoryStream since we have this discussion recorder here for future fix.

Copy link
Contributor

@aik-jahoda aik-jahoda left a comment

Choose a reason for hiding this comment

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

LGTM

@pgovind pgovind merged commit 86224fd into dotnet:master Aug 26, 2020
carlossanlop pushed a commit to carlossanlop/runtime that referenced this pull request Aug 28, 2020
* src files annotated

* ref file

* Address feedback
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
@karelz karelz added this to the 6.0.0 milestone Jan 26, 2021
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.

6 participants