Closed bhamail closed 2 years ago
Thanks @bhamail for catching this and the PR!
Could you point me to a good way to add a unit test for this case?
You can just add a test case to CycloneToSpdxTest.java.
You can create a local subdirectory under src/test/resources cdxboms
and put the test file there.
BTW - It's interesting the findbugs didn't find this issue. I'll need run sonar against this code to see if there are similar issues.
BTW - It's interesting the findbugs didn't find this issue. I'll need run sonar against this code to see if there are similar issues.
\
@bhamail I'll definitely give Sonatype Lift a try. I do use Sonatype for my Maven repo work, just haven't tried Lift.
Using the test file below, I was getting a NPE due to a null from
metadata.getTools()
.This PR attempts to guard against that case. (Pre-apologies for tab/space madness. Trying to go to space where possible.)
Could you point me to a good way to add a unit test for this case?
Here's the test file I used, but I'd like to add a test for this condition.