Skip to content

Commit fceaa22

Browse files
committed
Add comment to init function
Signed-off-by: Gary O'Neall <[email protected]>
1 parent ead1fd5 commit fceaa22

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/spdx/storage/listedlicense/LicenseCreatorAgent.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public class LicenseCreatorAgent {
5252
private final TypedValue creationInfoTV;
5353

5454
public LicenseCreatorAgent(String licenseListVersion) throws SpdxInvalidIdException, SpdxInvalidTypeException, ModelRegistryException {
55+
// Call init to make sure the model is initialized before it is used by the license factory methods
56+
// Note that multiple calls to init does not cause any harm
5557
SpdxModelFactory.init();
5658
this.objectUri = OBJECT_URI_PREFIX + licenseListVersion.replace('.','_');
5759
this.typedValue = new TypedValue(objectUri, SpdxConstantsV3.CORE_AGENT, SpdxConstantsV3.MODEL_SPEC_VERSION);

0 commit comments

Comments
 (0)