A canonical way to create ExtractedLicenseInfo (Helper method and documentation, Issue #215) #216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a helper class in ModelObject for correct creation of ExtractedLicenseInfo objects. This should resolve #215.
I also added documentation and comments regarding correct use of such objects. These may need correction:
It appeared to me that instances
ExtractedLicenseInfoand anSpdxDocumentbecome inherently linked after construction and are only assumed to produce correct behaviour when used together. I tried to document this, since it's a detail critical to data integrity but remains intransparent to me due to the complex workings of *ModelStore.:https://github.com/jkrae-metaeffekt/Spdx-Java-Library/blob/fbfd9acdc9aa81a2f17c7e5dff101c1fec495412/src/main/java/org/spdx/library/model/ModelObject.java#L1420C2-L1422 .
Please correct me on this. In case of correction, the other added javadocs may need adjustment, too.
edit: formatting fix