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
Fix CopyFromInternal NullReferenceException on empty otherCell. #1461
base: develop
Are you sure you want to change the base?
Fix CopyFromInternal NullReferenceException on empty otherCell. #1461
Conversation
Thanks. Please add a unit test. |
@igitur, Thank for response! |
@igitur, hi! |
@NicholasNoise I will research this until the end of the week. |
@@ -1083,5 +1083,24 @@ public void TryGetValueFormulaEvaluation() | |||
Assert.IsTrue(A3.TryGetValue(out String _)); | |||
} | |||
} | |||
|
|||
[Test] | |||
public void CopyFromInternalNullTest() |
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.
I'm still curious as to what usage of the public API led to the exposure of the bug. The use of internals in the test project isn't disallowed, but ideally we want a test using only the public API. Maybe we should discuss in the main thread first. If you can show me the code sample to reproduce the issue, that would be great.
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.
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.
NRE or other unhandled exceptions are no good for the internals nor the public API.
I think of this PR as a declaration of behavior: do nothing or throw ArgumentNullException.
Of course, the decision is up to you.
I have upgraded to latest versions ClosedXML.Signed (from 0.95.0-beta1 to 0.95.3) and ClosedXML.Report (from 0.2.0-beta1 to 0.2.1). One of my test fails on generation of template with NRE with this stack trace:
I cant provide any additional info at this point of time.