commercetools / commercetools-sync-java

Java library for importing and syncing (taking care of changes) data into one or more commercetools projects from external data files or from another commercetools project.
https://commercetools.github.io/commercetools-sync-java
Apache License 2.0
32 stars 37 forks source link

Fix NPE in Inventory entry reference resolution #1124

Closed salander85 closed 9 months ago

salander85 commented 9 months ago

Summary

https://commercetools.atlassian.net/browse/DEVX-275

Description

To avoid NPE thrown by InventoryEntryDraftBuilder 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).