Uploaded image for project: 'E-commerce'
  1. E-commerce
  2. ECOMMERCE-508

Error when select product

XMLWordPrintable

      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.

        Acceptance criteria

              lam.nguyen Lam Nguyen Bao
              lam.nguyen Lam Nguyen Bao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 7h
                    7h