Skip to content

Conversation

LSantha
Copy link
Collaborator

@LSantha LSantha commented Mar 16, 2020

  • fix NPE in product list when small image is missing for a product
  • fix NPE in product carousel when thumbnail is missing for a product

Description

Product list component doesn't display a product if the product doesn't have a small_image (property is null) and it logs null pointer exception.
The same applied to the product carousel when a product doesn't have a thumbnail.

Related Issue

CIF-1314

How Has This Been Tested?

Unit test, manually.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

 * fix NPE in product list when small image is missing for a product
 * fix NPE in product carousel when thumbnail is missing for a product
@codecov
Copy link

codecov bot commented Mar 16, 2020

Codecov Report

Merging #226 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #226      +/-   ##
============================================
+ Coverage     60.09%   60.11%   +0.01%     
- Complexity      539      541       +2     
============================================
  Files           147      147              
  Lines          4368     4370       +2     
  Branches        745      747       +2     
============================================
+ Hits           2625     2627       +2     
  Misses         1652     1652              
  Partials         91       91              
Flag Coverage Δ Complexity Δ
#jest 38.21% <ø> (ø) 0.00 <ø> (ø)
#karma 94.97% <ø> (ø) 0.00 <ø> (ø)
#unittests 84.90% <100.00%> (+0.01%) 541.00 <0.00> (+2.00)
Impacted Files Coverage Δ Complexity Δ
...models/v1/productcarousel/ProductCarouselImpl.java 87.50% <100.00%> (+0.22%) 22.00 <0.00> (+1.00)
...nternal/models/v1/productlist/ProductListImpl.java 78.43% <100.00%> (+0.21%) 34.00 <0.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de52353...4582f3a. Read the comment docs.

@LSantha LSantha requested review from cjelger, mhaack and dplaton March 16, 2020 11:38
@mhaack mhaack added the bug Something isn't working label Mar 16, 2020
@cjelger cjelger merged commit 1463159 into master Mar 18, 2020
@cjelger cjelger deleted the CIF-1314 branch March 18, 2020 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants