Skip to content

Conversation

@tiegz
Copy link
Contributor

@tiegz tiegz commented Dec 26, 2025

The javadocs for Spdx2to3Converter.stringToAgent() say:

  • @return Agent based on parsing the spdx2personOrgString - if NONE or NOASSERTION is the string value, the null is returned

But null is not being returned for NONE or NOASSERTION strings, so the method is creating a new "Agent" node for each time these agent values are needed, e.g. for a "suppliedBy" value:

...
  }, {
    "spdxId" : "https://org.spdx.spdxdata/4320c18a-dbd2-49ba-9ca7-c0e5230700a6/SPDXRef-gnrtd75",
    "type" : "Agent",
    "name" : "NOASSERTION",
    "creationInfo" : "_:creationInfo_0"
  }, {
    "spdxId" : "https://org.spdx.spdxdata/4320c18a-dbd2-49ba-9ca7-c0e5230700a6/SPDXRef-gnrtd83",
    "type" : "Agent",
    "name" : "NOASSERTION",
    "creationInfo" : "_:creationInfo_0"
  }, {
    "spdxId" : "https://org.spdx.spdxdata/4320c18a-dbd2-49ba-9ca7-c0e5230700a6/SPDXRef-gnrtd91",
    "type" : "Agent",
    "name" : "NOASSERTION",
    "creationInfo" : "_:creationInfo_0"
  }, {
...

This fix returns null instead so the convert won't create the "Agent" nodes.

@tiegz tiegz force-pushed the tz/singletonify-no-assertion-licenses branch from 69c2423 to f053201 Compare December 26, 2025 21:14
Copy link
Member

@goneall goneall left a comment

Choose a reason for hiding this comment

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

Thanks @tiegz for the PR.

I looked back through the history and it looks like the check for NONE and NOASSERTION was never implemented, so I don't expect there to be any issues with implementing the original intent based on the comments.

@goneall goneall merged commit a2a1145 into spdx:master Dec 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants