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 npe in state reference resolution utils #1118

Merged

Conversation

salander85
Copy link
Contributor

Summary

JIRA: https://commercetools.atlassian.net/browse/DEVX-277

Hints for Review

To avoid NPE thrown by StateDraftBuilder i've added a check for required fields and created empty draft in case of missing required (which will fail in sync() with proper error message because it'll be checked by BatchValidator).
This solution isn't discussed yet. Maybe you have other idea to handle this? Maybe the behavior before was already correct?

@salander85 salander85 requested a review from lojzatran November 21, 2023 13:38
@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (784c27e) 97.33% compared to head (68a4953) 97.34%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1118      +/-   ##
============================================
+ Coverage     97.33%   97.34%   +0.01%     
+ Complexity     2674     2671       -3     
============================================
  Files           229      229              
  Lines          8502     8487      -15     
  Branches        526      519       -7     
============================================
- Hits           8275     8262      -13     
+ Misses          141      140       -1     
+ Partials         86       85       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@salander85 salander85 merged commit 71bf9a6 into master Nov 30, 2023
6 checks passed
@salander85 salander85 deleted the DEVX-277_Fix-npe-in-state-reference-resolution-utils branch November 30, 2023 10:10
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.

3 participants