Skip to content

Commit 3648981

Browse files
committed
Fix: make sure creationInfo is added for listed licenses/exceptions
Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
1 parent 118cb55 commit 3648981

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void unlock() {
114114
Gson gson = new Gson(); // we should be able to reuse since all access is within write locks
115115

116116
public static String objectUriToLicenseOrExceptionId(String objectUri) {
117-
return objectUri.substring(LISTED_LICENSE_NAMESPACE.length()+1);
117+
return objectUri.substring(LISTED_LICENSE_NAMESPACE.length());
118118
}
119119

120120
public static String licenseOrExceptionIdToObjectUri(String id) {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class SpdxV3ListedLicenseModelStore implements IModelStore {
4545
// Licenses
4646
SUPPORTED_V3_DESCRIPTORS.add(SpdxConstantsV3.PROP_LICENSE_TEXT);
4747
SUPPORTED_V3_DESCRIPTORS.add(SpdxConstantsV3.PROP_NAME);
48+
SUPPORTED_V3_DESCRIPTORS.add(SpdxConstantsV3.PROP_CREATION_INFO);
4849
SUPPORTED_V3_DESCRIPTORS.add(SpdxConstantsV3.PROP_STANDARD_LICENSE_HEADER);
4950
SUPPORTED_V3_DESCRIPTORS.add(SpdxConstantsV3.PROP_IS_OSI_APPROVED);
5051
SUPPORTED_V3_DESCRIPTORS.add(SpdxConstantsV3.PROP_IS_FSF_LIBRE);
@@ -139,6 +140,7 @@ public List<PropertyDescriptor> getPropertyValueDescriptors(
139140
retval.add(pd);
140141
}
141142
});
143+
retval.add(SpdxConstantsV3.PROP_CREATION_INFO);
142144
return retval;
143145
}
144146

0 commit comments

Comments
 (0)