Skip to content

Microsoft.AspNetCore.Http: Decorate priorFeature as nullable on StreamResponseBodyFeature ctor #38875

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Http/Http/src/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#nullable enable
*REMOVED*Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature! priorFeature) -> void
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature? priorFeature) -> void
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature? priorFeature) -> void
*REMOVED*Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature! priorFeature) -> void
Microsoft.AspNetCore.Http.StreamResponseBodyFeature.StreamResponseBodyFeature(System.IO.Stream! stream, Microsoft.AspNetCore.Http.Features.IHttpResponseBodyFeature? priorFeature) -> void

Copy link
Member

@halter73 halter73 Dec 8, 2021

Choose a reason for hiding this comment

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

You beat me to it! @dotnet/aspnet-build Any idea why the code fix doesn't do it this way automatically? Is it not supposed to?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure, @agocke do you know who we should consult with on the API analyzer?

Copy link
Contributor

@pranavkm pranavkm Dec 8, 2021

Choose a reason for hiding this comment

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

The codefix updates the shipping file as intended. For some reason our team insists it is wrong thing to do: #31076 (comment) even tho these files exist solely for the benefit of the tool. 🤷🏽

2 changes: 1 addition & 1 deletion src/Http/Http/src/StreamResponseBodyFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public StreamResponseBodyFeature(Stream stream)
/// </summary>
/// <param name="stream"></param>
/// <param name="priorFeature"></param>
public StreamResponseBodyFeature(Stream stream, IHttpResponseBodyFeature priorFeature)
public StreamResponseBodyFeature(Stream stream, IHttpResponseBodyFeature? priorFeature)
{
Stream = stream ?? throw new ArgumentNullException(nameof(stream));
PriorFeature = priorFeature;
Expand Down