Take into account the provided format in Utf8Parser.TryParse for bool#100676
Take into account the provided format in Utf8Parser.TryParse for bool#100676joegoldman2 wants to merge 3 commits intodotnet:mainfrom joegoldman2:fix/100659
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-memory |
|
Thanks for the issue and fix. I'm not sure we should take this, though. It's been this way for a very long time, and there could easily be code relying on both casings being parsed. Can you elaborate on in what situation it's breaking you that TryParse allows for additional casings to be parsed successfully? |
|
Thank you for your feedback. To be honest, I don't have a scenario in mind and I saw the "issue" when reading the code. I'm fine with keeping the current implementation, which allows parsing regardless of the case sensitivity. |
|
Thanks. Personally, I'd be more inclined to "fix" the comment in the source as well as the docs, to make them match the long-standing behavior. But I'll leave that up to the area owners. @dotnet/area-system-buffers ? |
|
I'd like weigh in from @GrabYourPitchforks since he was involved in getting this all supported in the first place. I think this is overall less important if we just update |
|
Closing in favor of #103861. |
Fixes #100659.
I couldn't find any existing unit tests for this class but I'd be happy to add/update them if anyone can give me a hint.