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

fix: Prevent null reference exceptions while serializing LoadedModuleWireModelCollection. (#2185) #2187

Merged
merged 3 commits into from
Jan 12, 2024

Conversation

tippmar-nr
Copy link
Member

@tippmar-nr tippmar-nr commented Jan 12, 2024

Thank you for submitting a pull request. Please review our contributing guidelines and code of conduct.

Description

Adds defensive coding to prevent null reference exceptions while serializing LoadedModuleWireModelCollection. Improves unit tests to check for null values.

Fixes #2185

Author Checklist

  • Unit tests, Integration tests, and Unbounded tests completed
  • Performance testing completed with satisfactory results (if required)

Reviewer Checklist

  • Perform code review
  • Pull request was adequately tested (new/existing tests, performance tests)

Copy link
Member

@chynesNR chynesNR left a comment

Choose a reason for hiding this comment

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

Ah, now I get why this popped up. Looks good.

@tippmar-nr tippmar-nr enabled auto-merge (squash) January 12, 2024 20:44
@codecov-commenter
Copy link

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (11c0241) 81.02% compared to head (52d7ede) 81.01%.
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2187      +/-   ##
==========================================
- Coverage   81.02%   81.01%   -0.01%     
==========================================
  Files         396      396              
  Lines       24721    24713       -8     
  Branches     2997     2997              
==========================================
- Hits        20029    20021       -8     
+ Misses       3904     3903       -1     
- Partials      788      789       +1     
Files Coverage Δ
...rs/LoadedModuleWireModelCollectionJsonConverter.cs 83.33% <0.00%> (-4.17%) ⬇️
...Core/WireModels/LoadedModuleWireModelCollection.cs 99.27% <83.33%> (-0.73%) ⬇️

... and 2 files with indirect coverage changes

@tippmar-nr tippmar-nr merged commit afb6352 into main Jan 12, 2024
78 checks passed
@tippmar-nr tippmar-nr deleted the fix/loaded-module-wire-model-json-serialization branch January 12, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null reference exception in WriteJsonImpl
5 participants