-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Mark or set encoding param in StreamReader ctor to be nullable #108542
base: main
Are you sure you want to change the base?
Mark or set encoding param in StreamReader ctor to be nullable #108542
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
Should the
Also; are there any tests that could be modified to verify null encoding works (and acts as UTF8)? |
Yes, as @lilinus mentioned, the constructors that accept |
thanks for the feedback! sure, I'm gong to update now. |
Ok, I also have done refactoring the test of StreamReader's constructor as well. |
1d796f1
to
c74bd44
Compare
@dotnet/area-system-io friends, could you take a look/review here? Also maybe you could suggest or explain why the pipeline of "runtime-dev-innerloop (Build linux-x64 debug Libraries_AllConfigurations)" is running for more than 12 hours and never ends? Or should I just close this PR? |
From my personal experience, it can take some time before a PR gets reviewed/merged. I imagine the team also has a lot of critical work to complete for .NET 9 they need to prioritize. I would have patience, it is gonna get reviewed eventually 😄 |
got it, thanks! |
hi @dotnet/area-system-io team Just to remind, could you please review this PR? It's been about 2 weeks now... |
c74bd44
to
b7a69c9
Compare
Rebase this to main branch to ensure my PR is up to date as of 23rd October. |
b7a69c9
to
28c4b52
Compare
rebase again with the latest main branch. @dotnet/area-system-io team, could you please review this PR? It's been a month without any updates... |
…sAndOpenPath to not require Encoding param anymore like StreamWriter
…sAndOpenPath to not require Encoding param anymore like StreamWriter
…as been set to nullable
28c4b52
to
305cd6b
Compare
rebase again with main branch as of 4th Nov. |
AssertExtensions.Throws<ArgumentNullException>("encoding", () => new StreamReader("path", (Encoding)null)); | ||
AssertExtensions.Throws<ArgumentNullException>("encoding", () => new StreamReader("path", null, true)); | ||
AssertExtensions.Throws<ArgumentNullException>("encoding", () => new StreamReader("path", null, true, null)); | ||
AssertExtensions.Throws<ArgumentNullException>("encoding", () => new StreamReader("path", null, true, -1)); |
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.
Do we have tests that pass in null successfully?
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.
@stephentoub
You're right! I'm going to add these tests that focusing on null value passing today.
Hopefully I will submit the tests tomorrow the latest.
Thanks! BTW, I might be delayed as I'm also going to watch dotnetConf. 😊
Congratulations for the dotnetConf event and the launch of .NET 9.0! 👍
Fixes #106236