Details
-
Bug
-
Resolution: Done
-
Neutral
-
1.3.1
-
None
-
-
Empty show more show less
-
AuthorX 6
-
2
Description
Step to reproduce:
+ Go to Pages app, add a product detail component on page.
+ Choose a product which the price is null as below image:
Problem:
Development Notes:
Stream/optional APIs are not well handling for retrieve product information. Potential NPE or
NoSuchElementException (call optional.get() without check, or accessing properties without null check) can be thrown.
see CommercetoolsProduct#populatePrice -> call get() without check
CommercetoolsProduct#populateImageURLs -> productProjection.getMasterVariant().getImages()
We need to check and do some refactor to ensure that the APIs are using correctly.
Checklists
Acceptance criteria