Skip to content

Conversation

@LSantha
Copy link
Collaborator

@LSantha LSantha commented Sep 8, 2021

Fixed NPEs when dynamic categoryPage or productPage is null.

Related Issue

CIF-2215

How Has This Been Tested?

Manually, unit tests.

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.

 * fixed NPEs when dynamic categoryPage or productPage is null
@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #697 (c85ea85) into master (89d906e) will decrease coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #697      +/-   ##
============================================
- Coverage     88.58%   88.57%   -0.01%     
- Complexity     1600     1604       +4     
============================================
  Files           282      282              
  Lines          7131     7135       +4     
  Branches       1048     1051       +3     
============================================
+ Hits           6317     6320       +3     
  Misses          618      618              
- Partials        196      197       +1     
Flag Coverage Δ
integration 59.65% <50.00%> (-0.06%) ⬇️
jest 85.61% <ø> (ø)
karma 90.01% <ø> (ø)
unittests 89.03% <80.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../internal/models/v1/breadcrumb/BreadcrumbImpl.java 90.21% <80.00%> (-0.70%) ⬇️

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 89d906e...c85ea85. Read the comment docs.


String path = page.getPath();
return (path.contains(productPagePath + "/") || path.contains(categoryPagePath + "/"));
return (productPagePath != null && path.contains(productPagePath + "/") ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


String path = page.getPath();
return (path.contains(productPagePath + "/") || path.contains(categoryPagePath + "/"));
return (productPagePath != null && path.contains(productPagePath + "/") ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@herzog31 herzog31 added bug Something isn't working verified labels Sep 10, 2021
@herzog31 herzog31 merged commit 0768faa into master Sep 10, 2021
@herzog31 herzog31 deleted the CIF-2215 branch September 10, 2021 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants