-
Notifications
You must be signed in to change notification settings - Fork 561
Fixed NullReferenceException in OpenXmlElement RawOuterXml field #818
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
Conversation
@aidilumarov Thanks for the catch! Can you add a regression test so that it will be caught in the future? |
@aidilumarov I'd like to get a 2.12.0 release out this week. If you can get some tests in, we'll have this as part of that release. Also, can you update the CHANGELOG.md to include this? |
@twsouthwick Sorry for taking long. I was off for several weeks. I have made the changes you asked for. Kind regards. |
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.
Thanks!
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.
Looks like the build is broken. We have warnings as errors on CI builds
CHANGELOG.md
Outdated
|
||
### Fixed | ||
- Fixed a `System.NullReferenceException` when setting _rawOuterXml field in `DocumentFormat.OpenXml.OpenXml` (#818) | ||
- Added regression tests in `DocumentFormat.OpenXml.Tests.OpenXmlElementTest2` to check for the mentioned exceptions in the future (#818) |
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.
This line is unneeded. I try to keep the changelog focused on observable changes to the library
@@ -0,0 +1,7 @@ | |||
{ | |||
"profiles": { | |||
"DocumentFormat.OpenXml": { |
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.
This file and the other one appear unrelated to the change. I believe this is for vs code. If so, happy to take it but would like the rest of the projects supported as well. Best in a separate pr though
remove whitespace
I've taken the liberty of updating the branch so it can be merged |
* Allow rewriting of all malformed URIs regardless of target value (#835) * Fixed `OpenXmlElement.RawOuterXml` to properly set null values without throwing (#818) Co-authored-by: Alex Kindle <[email protected]> Co-authored-by: aidilumarov <[email protected]>
The current version of your code:
It sets _rawOuterXml to string.Empty if value is null, but instead of leaving the setter immediately, it resets the field to null at the end of the setter
The changes I made should resolve the issue.
Thanks.