You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@armintaenzertng I was able to duplicates this with a unit test. From trying out various scenarios, it looks like this only occurs in the XML form and only if you add a duplicate document describes through a new relationship rather than adding it to the describes collection.
I'll transfer this to the spdx-java-jackson-store which implements the XML format.
I suspect the issue is related to a de-duplication algorithm to prevent duplicate relationships from being serialized.
Since this is a very unlikely scenario for normal use, I'm not planning on doing much more work on this issue - but feel free to look into it in the code if you feel this is an important issue to resolve. Pull requests are welcome. I'll create a draft PR with the unit test.
This also raises the question of the value of a DESCRIBES relationship when the tag documentDescribes already exists.
There was a discussion on this in the SPDX spec repo and it was decided that the tag/value, JSON, and YAML formats will use the describes tag even though the the relationship already exists. The actual SPDX Model uses relationships for the hasFiles and documentDescribes property implementation. These tags are just added as a convenience for the serialization and desearlization in these formats.
Not sure whether this is a tools-java or spdx-java-library issue. I generate a document using the following method:
Note the
assert
statement that indicates that the generateddocument
is valid.The above yields the following output in
temp.xml
:But now, when I call
I get the following error:
Thus, the tools-java and spdx-java-library Verify methods seem to contradict each other.
This also raises the question of the value of a DESCRIBES relationship when the tag
documentDescribes
already exists.The text was updated successfully, but these errors were encountered: