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

Investigate nullability of members in System.Data.Common affected by XmlSerializer.Deserialize #41497

Closed
jozkee opened this issue Aug 28, 2020 · 2 comments
Assignees

Comments

@jozkee
Copy link
Member

jozkee commented Aug 28, 2020

also IMO we should file an issue to investigate if this should return nullable here and below

Originally posted by @krwq in #41474 (comment)

retValue = deserializerWithRootAttribute.Deserialize(xmlReader);

return (deserializerWithOutRootAttribute.Deserialize(strreader))!;

return (deserializerWithOutRootAttribute.Deserialize(strreader))!;

return (deserializerWithRootAttribute.Deserialize(xmlReader))!;

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Data untriaged New issue has not been triaged by the area owner labels Aug 28, 2020
@ghost
Copy link

ghost commented Aug 28, 2020

Tagging subscribers to this area: @roji, @ajcvickers
See info in area-owners.md if you want to be subscribed.

@jozkee jozkee added this to the Future milestone Aug 28, 2020
@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Aug 31, 2020
@roji roji modified the milestones: Future, 6.0.0 Sep 4, 2020
@roji roji self-assigned this Jul 12, 2021
@roji
Copy link
Member

roji commented Jul 14, 2021

I took a quick look at this, and non-nullable seems like the right annotation (though I'm not very familiar with this part of the code base). For example, XMLDiffLoader.ReadOldRowData calls DataColumn.ConvertXmlToObject (the method in question), and assigns its results to DataColumn[int], which is clearly non-nullable (there's a Debug.Assert check for that).

In any case, DataStorage.cs (where this method resides) is internal, and the nullability here doesn't seem to leak anywhere close to public surface APIs, so the importance here is limited and we can always fix in the future.

So I'll go ahead and close this.

@roji roji closed this as completed Jul 14, 2021
@roji roji removed this from the 6.0.0 milestone Jul 14, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants