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

Port nullability annotations to refs XmlDocument and XmlSerializer #41474

Merged
3 commits merged into from
Aug 28, 2020

Conversation

jozkee
Copy link
Member

@jozkee jozkee commented Aug 27, 2020

Contributes to #2339

For System.Xml.XmlDocument all types were forwarded to ReaderWriter assembly so I only enabled nullability in the csprojs.
For System.Xml.XmlSerializer some types were forwarded to ReaderWriter but some other types were in place.

@ghost
Copy link

ghost commented Aug 27, 2020

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

Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

LGTM but please get a second review

@@ -161,7 +161,7 @@ public override object ConvertXmlToObject(string s)

StringReader strreader = new StringReader(s);
XmlSerializer deserializerWithOutRootAttribute = ObjectStorage.GetXmlSerializer(_dataType);
return (deserializerWithOutRootAttribute.Deserialize(strreader));
return (deserializerWithOutRootAttribute.Deserialize(strreader))!;
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Created #41497.

@krwq
Copy link
Member

krwq commented Aug 28, 2020

LGTM, please file an issue for the potential System.Data.Common issue (or TODO-NULLABLE)

@jozkee jozkee self-assigned this Aug 28, 2020
@ghost
Copy link

ghost commented Aug 28, 2020

Hello @jozkee!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit c587f9d into dotnet:master Aug 28, 2020
carlossanlop pushed a commit to carlossanlop/runtime that referenced this pull request Aug 28, 2020
…otnet#41474)

* Port nullability annotations to refs XmlDocument and XmlSerializer

* Fix new System.Data.Common nullability related errors

* Switch nullability of parameter in SoapElementAttribute ctor
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
@jozkee jozkee deleted the nullability_9 branch March 24, 2021 19:35
This pull request was closed.
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.

4 participants