extentreports-java icon indicating copy to clipboard operation
extentreports-java copied to clipboard

added guard code to avoid NPE in assignCategory and assignAuthors functions

Open jitender94136 opened this issue 4 years ago • 2 comments

jitender94136 avatar Jul 29 '21 11:07 jitender94136

Codecov Report

Merging #314 (e0a9607) into master (6d004b2) will decrease coverage by 0.10%. The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #314      +/-   ##
============================================
- Coverage     78.10%   78.00%   -0.11%     
- Complexity      493      495       +2     
============================================
  Files            89       89              
  Lines          1544     1546       +2     
  Branches        128      128              
============================================
  Hits           1206     1206              
  Misses          269      269              
- Partials         69       71       +2     
Impacted Files Coverage Δ
.../java/com/aventstack/extentreports/ExtentTest.java 91.03% <0.00%> (-1.28%) :arrow_down:

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 6d004b2...e0a9607. Read the comment docs.

codecov[bot] avatar Jul 29 '21 12:07 codecov[bot]

Thank you for including this guardrail. Although, both can be used to the same effect, the following method is what has been used throughout this library. Can you please make this change and resend your PR?

x.trim().length() != 0

would be:

!x.trim().isEmpty()

anshooarora avatar Sep 14 '21 03:09 anshooarora