-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
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.
LGTM but please get a second review
src/libraries/System.Data.Common/src/System/Data/Common/ObjectStorage.cs
Show resolved
Hide resolved
@@ -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))!; |
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.
also IMO we should file an issue to investigate if this should return nullable here and below
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.
Created #41497.
src/libraries/System.Xml.XmlSerializer/ref/System.Xml.XmlSerializer.cs
Outdated
Show resolved
Hide resolved
LGTM, please file an issue for the potential System.Data.Common issue (or TODO-NULLABLE) |
Hello @jozkee! Because this pull request has the 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 (
|
…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
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.