Skip to content

Commit cd1b91d

Browse files
authored
Add an option to not copy license details in CopyManager (#140)
* Add an option to copy to not copy listed license details Signed-off-by: Gary O'Neall <[email protected]> * Move CrossRef from simple license info to ListedLicense Signed-off-by: Gary O'Neall <[email protected]> * Change all LicenseException references to ListedLicenseException Signed-off-by: Gary O'Neall <[email protected]> * Fix unit test failures Signed-off-by: Gary O'Neall <[email protected]> Signed-off-by: Gary O'Neall <[email protected]>
1 parent 3f81382 commit cd1b91d

File tree

12 files changed

+103
-44
lines changed

12 files changed

+103
-44
lines changed

src/main/java/org/spdx/library/ModelCopyManager.java

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public String putCopiedId(IModelStore fromStore, String fromDocumentUri, String
123123
}
124124
return idMap.put(fromId, toId);
125125
}
126-
126+
127127
/**
128128
* Copy an item from one Model Object Store to another
129129
* @param toStore Model Store to copy to
@@ -136,6 +136,24 @@ public String putCopiedId(IModelStore fromStore, String fromDocumentUri, String
136136
* @throws InvalidSPDXAnalysisException
137137
*/
138138
public void copy(IModelStore toStore, String toDocumentUri, String toId, IModelStore fromStore, String fromDocumentUri, String fromId, String type) throws InvalidSPDXAnalysisException {
139+
copy(toStore, toDocumentUri, toId, fromStore, fromDocumentUri, fromId, type, false);
140+
}
141+
142+
/**
143+
* Copy an item from one Model Object Store to another
144+
* @param toStore Model Store to copy to
145+
* @param toId Id to use in the copy
146+
* @param toDocumentUri Target document URI
147+
* @param fromStore Model Store containing the source item
148+
* @param fromDocumentUri Document URI for the source item
149+
* @param fromId ID source ID
150+
* @param type Type to copy
151+
* @param excludeLicenseDetails If true, don't copy over properties of the listed licenses
152+
* @throws InvalidSPDXAnalysisException
153+
*/
154+
public void copy(IModelStore toStore, String toDocumentUri, String toId,
155+
IModelStore fromStore, String fromDocumentUri, String fromId,
156+
String type, boolean excludeLicenseDetails) throws InvalidSPDXAnalysisException {
139157
Objects.requireNonNull(toStore, "ToStore can not be null");
140158
Objects.requireNonNull(toDocumentUri, "To Document URI can not be null");
141159
Objects.requireNonNull(fromStore, "FromStore can not be null");
@@ -150,12 +168,16 @@ public void copy(IModelStore toStore, String toDocumentUri, String toId, IModelS
150168
toStore.create(toDocumentUri, toId, type);
151169
}
152170
putCopiedId(fromStore, fromDocumentUri, fromId, toStore, toDocumentUri, toId);
153-
List<String> propertyNames = fromStore.getPropertyValueNames(fromDocumentUri, fromId);
154-
for (String propName:propertyNames) {
155-
if (fromStore.isCollectionProperty(fromDocumentUri, fromId, propName)) {
156-
copyCollectionProperty(toStore, toDocumentUri, toId, fromStore, fromDocumentUri, fromId, propName);
157-
} else {
158-
copyIndividualProperty(toStore, toDocumentUri, toId, fromStore, fromDocumentUri, fromId, propName);
171+
if (!(excludeLicenseDetails &&
172+
(SpdxConstants.CLASS_SPDX_LISTED_LICENSE.equals(type) ||
173+
SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION.equals(type)))) {
174+
List<String> propertyNames = fromStore.getPropertyValueNames(fromDocumentUri, fromId);
175+
for (String propName:propertyNames) {
176+
if (fromStore.isCollectionProperty(fromDocumentUri, fromId, propName)) {
177+
copyCollectionProperty(toStore, toDocumentUri, toId, fromStore, fromDocumentUri, fromId, propName, excludeLicenseDetails);
178+
} else {
179+
copyIndividualProperty(toStore, toDocumentUri, toId, fromStore, fromDocumentUri, fromId, propName, excludeLicenseDetails);
180+
}
159181
}
160182
}
161183
}
@@ -169,10 +191,11 @@ public void copy(IModelStore toStore, String toDocumentUri, String toId, IModelS
169191
* @param fromDocumentUri Document URI for the source item
170192
* @param fromId ID source ID
171193
* @param propName Name of the property
194+
* @param excludeLicenseDetails If true, don't copy over properties of the listed licenses
172195
* @throws InvalidSPDXAnalysisException
173196
*/
174197
private void copyIndividualProperty(IModelStore toStore, String toDocumentUri, String toId, IModelStore fromStore,
175-
String fromDocumentUri, String fromId, String propName) throws InvalidSPDXAnalysisException {
198+
String fromDocumentUri, String fromId, String propName, boolean excludeLicenseDetails) throws InvalidSPDXAnalysisException {
176199
if (fromStore.isCollectionProperty(fromDocumentUri, fromId, propName)) {
177200
throw new InvalidSPDXAnalysisException("Property "+propName+" is a collection type");
178201
}
@@ -187,7 +210,7 @@ private void copyIndividualProperty(IModelStore toStore, String toDocumentUri, S
187210
} else {
188211
toStore.setValue(toDocumentUri, toId, propName,
189212
copy(toStore, toDocumentUri, fromStore, fromDocumentUri,
190-
tv.getId(), tv.getType()));
213+
tv.getId(), tv.getType(), excludeLicenseDetails));
191214
}
192215
} else {
193216
toStore.setValue(toDocumentUri, toId, propName, result.get());
@@ -204,10 +227,11 @@ private void copyIndividualProperty(IModelStore toStore, String toDocumentUri, S
204227
* @param fromDocumentUri Document URI for the source item
205228
* @param fromId ID source ID
206229
* @param propName Name of the property
230+
* @param excludeLicenseDetails If true, don't copy over properties of the listed licenses
207231
* @throws InvalidSPDXAnalysisException
208232
*/
209233
private void copyCollectionProperty(IModelStore toStore, String toDocumentUri, String toId, IModelStore fromStore,
210-
String fromDocumentUri, String fromId, String propName) throws InvalidSPDXAnalysisException {
234+
String fromDocumentUri, String fromId, String propName, boolean excludeLicenseDetails) throws InvalidSPDXAnalysisException {
211235
if (!fromStore.isCollectionProperty(fromDocumentUri, fromId, propName)) {
212236
throw new InvalidSPDXAnalysisException("Property "+propName+" is not a collection type");
213237
}
@@ -223,14 +247,30 @@ private void copyCollectionProperty(IModelStore toStore, String toDocumentUri, S
223247
toStoreItem = listItemTv;
224248
} else {
225249
toStoreItem = copy(toStore, toDocumentUri, fromStore, fromDocumentUri,
226-
listItemTv.getId(), listItemTv.getType());
250+
listItemTv.getId(), listItemTv.getType(), excludeLicenseDetails);
227251
}
228252
} else {
229253
toStoreItem = listItem;
230254
}
231255
toStore.addValueToCollection(toDocumentUri, toId, propName, toStoreItem);
232256
}
233257
}
258+
259+
/**
260+
* Copy an item from one Model Object Store to another using the source ID for the target unless it is anonymous
261+
* @param toStore Model Store to copy to
262+
* @param toDocumentUri Target document URI
263+
* @param fromStore Model Store containing the source item
264+
* @param fromDocumentUri Document URI for the source item
265+
* @param sourceId ID source ID
266+
* @param type Type to copy
267+
* @return ID for the copied object
268+
* @throws InvalidSPDXAnalysisException
269+
*/
270+
public TypedValue copy(IModelStore toStore, String toDocumentUri, IModelStore fromStore,
271+
String fromDocumentUri, String sourceId, String type) throws InvalidSPDXAnalysisException {
272+
return copy(toStore, toDocumentUri, fromStore, fromDocumentUri, sourceId, type, false);
273+
}
234274

235275
/**
236276
* Copy an item from one Model Object Store to another using the source ID for the target unless it is anonymous
@@ -240,11 +280,12 @@ private void copyCollectionProperty(IModelStore toStore, String toDocumentUri, S
240280
* @param fromDocumentUri Document URI for the source item
241281
* @param sourceId ID source ID
242282
* @param type Type to copy
283+
* @param excludeLicenseDetails If true, don't copy over properties of the listed licenses
243284
* @return ID for the copied object
244285
* @throws InvalidSPDXAnalysisException
245286
*/
246287
public TypedValue copy(IModelStore toStore, String toDocumentUri, IModelStore fromStore,
247-
String fromDocumentUri, String sourceId, String type) throws InvalidSPDXAnalysisException {
288+
String fromDocumentUri, String sourceId, String type, boolean excludeLicenseDetails) throws InvalidSPDXAnalysisException {
248289
Objects.requireNonNull(toStore, "To Store can not be null");
249290
Objects.requireNonNull(toDocumentUri, "To Document URI can not be null");
250291
Objects.requireNonNull(fromStore, "From Store can not be null");
@@ -271,7 +312,7 @@ public TypedValue copy(IModelStore toStore, String toDocumentUri, IModelStore fr
271312
} else {
272313
toId = sourceId;
273314
}
274-
copy(toStore, toDocumentUri, toId, fromStore, fromDocumentUri, sourceId, type);
315+
copy(toStore, toDocumentUri, toId, fromStore, fromDocumentUri, sourceId, type, excludeLicenseDetails);
275316
}
276317
return new TypedValue(toId, type);
277318
}

src/main/java/org/spdx/library/SpdxConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public class SpdxConstants {
135135
CLASS_POINTER_COMPOUNT_POINTER, CLASS_POINTER_LINE_CHAR_POINTER, CLASS_SINGLE_POINTER};
136136

137137
// classes that use the listed license URI for their namespace
138-
public static final String[] LISTED_LICENSE_URI_CLASSES = {CLASS_SPDX_LISTED_LICENSE, CLASS_SPDX_LICENSE_EXCEPTION};
138+
public static final String[] LISTED_LICENSE_URI_CLASSES = {CLASS_SPDX_LISTED_LICENSE, CLASS_SPDX_LISTED_LICENSE_EXCEPTION};
139139

140140
// Enumeration class names
141141
public static final String ENUM_FILE_TYPE = "FileType";

src/main/java/org/spdx/library/model/SpdxModelFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public class SpdxModelFactory {
9393
typeToClass.put(SpdxConstants.CLASS_SPDX_LICENSE, License.class);
9494
typeToClass.put(SpdxConstants.CLASS_SPDX_LISTED_LICENSE, SpdxListedLicense.class);
9595
typeToClass.put(SpdxConstants.CLASS_SPDX_LICENSE_EXCEPTION, LicenseException.class);
96+
typeToClass.put(SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION, ListedLicenseException.class);
9697
typeToClass.put(SpdxConstants.CLASS_OR_LATER_OPERATOR, OrLaterOperator.class);
9798
typeToClass.put(SpdxConstants.CLASS_WITH_EXCEPTION_OPERATOR, WithExceptionOperator.class);
9899
typeToClass.put(SpdxConstants.CLASS_SPDX_FILE, SpdxFile.class);

src/main/java/org/spdx/library/model/license/LicenseExpressionParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ enum Operator {
6464
OPERATOR_MAP.put("with", Operator.WITH);
6565
}
6666
/**
67-
* Parses a license expression into an license for use in the RDF Parser
67+
* Parses a license expression into an license for use in the Model
6868
* @param expression Expression to be parsed
6969
* @param store Store containing any extractedLicenseInfos - if any extractedLicenseInfos by ID already exist, they will be used. If
7070
* none exist for an ID, they will be added. If null, the default model store will be used.
@@ -187,8 +187,8 @@ private static AnyLicenseInfo parseLicenseExpression(String[] tokens, IModelStor
187187
} else if (token.startsWith(SpdxConstants.NON_STD_LICENSE_ID_PRENUM)) {
188188
throw new LicenseParserException("WITH must be followed by a license exception. "+token+" is a Listed License type.");
189189
} else {
190-
licenseException = (LicenseException) SpdxModelFactory.createModelObject(store,
191-
documentUri, token, SpdxConstants.CLASS_SPDX_LICENSE_EXCEPTION, copyManager);
190+
licenseException = (ListedLicenseException) SpdxModelFactory.createModelObject(store,
191+
documentUri, token, SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION, copyManager);
192192
}
193193
AnyLicenseInfo operand = operandStack.pop();
194194
if (operand == null) {

src/main/java/org/spdx/library/model/license/LicenseInfoFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public static boolean isSpdxListedExceptionId(String id) {
148148
* @return the standard SPDX license exception or null if the ID is not in the SPDX license list
149149
* @throws InvalidSPDXAnalysisException
150150
*/
151-
public static LicenseException getListedExceptionById(String id) throws InvalidSPDXAnalysisException {
151+
public static ListedLicenseException getListedExceptionById(String id) throws InvalidSPDXAnalysisException {
152152
return ListedLicenses.getListedLicenses().getListedExceptionById(id);
153153
}
154154

src/main/java/org/spdx/library/model/license/ListedLicenseException.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ public ListedLicenseException(String id, String name, String text) throws Invali
8686
super(id, name, text);
8787
}
8888

89+
@Override
90+
public String getType() {
91+
return SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION;
92+
}
93+
8994
/**
9095
* @param exceptionTextHtml
9196
* @throws InvalidSPDXAnalysisException

src/main/java/org/spdx/library/model/license/SimpleLicensingInfo.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,13 @@
4040
*/
4141
public abstract class SimpleLicensingInfo extends AnyLicenseInfo {
4242

43-
Collection<CrossRef> crossRef;
4443
/**
4544
* Open or create a model object with the default store and default document URI
4645
* @param id ID for this object - must be unique within the SPDX document
4746
* @throws InvalidSPDXAnalysisException
4847
*/
49-
@SuppressWarnings("unchecked")
5048
SimpleLicensingInfo(String id) throws InvalidSPDXAnalysisException {
5149
super(id);
52-
crossRef = (Collection<CrossRef>)(Collection<?>)this.getObjectPropertyValueSet(SpdxConstants.PROP_CROSS_REF, CrossRef.class);
5350
if (!(this instanceof IndividualUriValue)) {
5451
setPropertyValue(SpdxConstants.PROP_LICENSE_ID, id); // Needs to be set as a property per spec
5552
}
@@ -64,12 +61,10 @@ public abstract class SimpleLicensingInfo extends AnyLicenseInfo {
6461
* @param create if true, create the license if it does not exist
6562
* @throws InvalidSPDXAnalysisException
6663
*/
67-
@SuppressWarnings("unchecked")
6864
SimpleLicensingInfo(IModelStore modelStore, String documentUri, String id,
6965
@Nullable ModelCopyManager copyManager, boolean create)
7066
throws InvalidSPDXAnalysisException {
7167
super(modelStore, documentUri, id, copyManager, create);
72-
crossRef = (Collection<CrossRef>)(Collection<?>)this.getObjectPropertyValueSet(SpdxConstants.PROP_CROSS_REF, CrossRef.class);
7368
if (!(this instanceof IndividualUriValue)) {
7469
setPropertyValue(SpdxConstants.PROP_LICENSE_ID, id); // Needs to be set as a property per spec
7570
}
@@ -142,8 +137,4 @@ public void setSeeAlso(Collection<String> seeAlsoUrl) throws InvalidSPDXAnalysis
142137
setPropertyValue(SpdxConstants.RDFS_PROP_SEE_ALSO, seeAlsoUrl);
143138
}
144139
}
145-
146-
public Collection<CrossRef> getCrossRef() throws InvalidSPDXAnalysisException {
147-
return this.crossRef;
148-
}
149140
}

src/main/java/org/spdx/library/model/license/SpdxListedLicense.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.spdx.library.model.license;
1818

19+
import java.util.ArrayList;
1920
import java.util.Collection;
2021
import java.util.List;
2122
import java.util.Objects;
@@ -40,13 +41,17 @@
4041
*/
4142
public class SpdxListedLicense extends License {
4243

44+
Collection<CrossRef> crossRef;
45+
4346
/**
4447
* Open or create a model object with the default store and default document URI
4548
* @param id ID for this object - must be unique within the SPDX document
4649
* @throws InvalidSPDXAnalysisException
4750
*/
51+
@SuppressWarnings("unchecked")
4852
public SpdxListedLicense(String id) throws InvalidSPDXAnalysisException {
4953
super(id);
54+
crossRef = (Collection<CrossRef>)(Collection<?>)this.getObjectPropertyValueSet(SpdxConstants.PROP_CROSS_REF, CrossRef.class);
5055
}
5156

5257
/**
@@ -58,10 +63,12 @@ public SpdxListedLicense(String id) throws InvalidSPDXAnalysisException {
5863
* @param create if true, create the license if it does not exist
5964
* @throws InvalidSPDXAnalysisException
6065
*/
66+
@SuppressWarnings("unchecked")
6167
public SpdxListedLicense(IModelStore modelStore, String documentUri, String id,
6268
@Nullable ModelCopyManager copyManager, boolean create)
6369
throws InvalidSPDXAnalysisException {
6470
super(modelStore, documentUri, id, copyManager, create);
71+
crossRef = (Collection<CrossRef>)(Collection<?>)this.getObjectPropertyValueSet(SpdxConstants.PROP_CROSS_REF, CrossRef.class);
6572
}
6673

6774
/**
@@ -79,6 +86,7 @@ public SpdxListedLicense(IModelStore modelStore, String documentUri, String id,
7986
* @param deprecatedVersion License list version when this license was first deprecated (null if not deprecated)
8087
* @throws InvalidSPDXAnalysisException
8188
*/
89+
@SuppressWarnings("unchecked")
8290
public SpdxListedLicense(String name, String id, String text, Collection<String> sourceUrl, String comments,
8391
String standardLicenseHeader, String template, boolean osiApproved, Boolean fsfLibre,
8492
String licenseTextHtml, boolean isDeprecated, String deprecatedVersion) throws InvalidSPDXAnalysisException {
@@ -94,6 +102,7 @@ public SpdxListedLicense(String name, String id, String text, Collection<String>
94102
setLicenseTextHtml(licenseTextHtml);
95103
setDeprecated(isDeprecated);
96104
setDeprecatedVersion(deprecatedVersion);
105+
crossRef = (Collection<CrossRef>)(Collection<?>)this.getObjectPropertyValueSet(SpdxConstants.PROP_CROSS_REF, CrossRef.class);
97106
}
98107

99108
/**
@@ -104,6 +113,7 @@ public SpdxListedLicense(SpdxListedLicense.Builder builder) throws InvalidSPDXAn
104113
this(builder.name, builder.id, builder.text, builder.sourceUrl, builder.comments, builder.standardLicenseHeader,
105114
builder.template, builder.osiApproved, builder.fsfLibre, builder.licenseTextHtml, builder.isDeprecated,
106115
builder.deprecatedVersion);
116+
this.crossRef.addAll(builder.crossRefs);
107117
}
108118

109119
@Override
@@ -206,6 +216,10 @@ public void setDeprecatedVersion(String deprecatedVersion) throws InvalidSPDXAna
206216
setPropertyValue(SpdxConstants.PROP_LIC_DEPRECATED_VERSION, deprecatedVersion);
207217
}
208218

219+
public Collection<CrossRef> getCrossRef() throws InvalidSPDXAnalysisException {
220+
return this.crossRef;
221+
}
222+
209223
@Override
210224
public String getType() {
211225
return SpdxConstants.CLASS_SPDX_LISTED_LICENSE;
@@ -251,6 +265,7 @@ public static class Builder {
251265
private String licenseTextHtml;
252266
private boolean isDeprecated;
253267
private String deprecatedVersion;
268+
private List<CrossRef> crossRefs = new ArrayList<CrossRef>();
254269

255270
/**
256271
* @param name License name
@@ -344,6 +359,10 @@ public Builder setDeprecatedVersion(String deprecatedVersion) {
344359
this.deprecatedVersion = deprecatedVersion;
345360
return this;
346361
}
362+
363+
public Builder addCrossRefs(CrossRef crossRef) {
364+
; this.crossRefs.add(crossRef);
365+
return this;
366+
}
347367
}
348-
349368
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public void create(String documentUri, String id, String type) throws InvalidSPD
229229
}
230230
this.licenseIds.put(id.toLowerCase(), id);
231231
this.listedLicenseCache.put(id, new LicenseJson(id));
232-
} else if (SpdxConstants.CLASS_SPDX_LICENSE_EXCEPTION.equals(type)) {
232+
} else if (SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION.equals(type)) {
233233
if (this.licenseIds.containsKey(id.toLowerCase()) || this.exceptionIds.containsKey(id.toLowerCase())) {
234234
logger.error("Duplicate SPDX ID on create: "+id);;
235235
throw new DuplicateSpdxIdException("ID "+id+" already exists.");
@@ -838,7 +838,7 @@ public Optional<TypedValue> getTypedValue(String documentUri, String id) throws
838838
if (licenseIds.containsKey(id.toLowerCase())) {
839839
return Optional.of(new TypedValue(id, SpdxConstants.CLASS_SPDX_LISTED_LICENSE));
840840
} else if (exceptionIds.containsKey(id.toLowerCase())) {
841-
return Optional.of(new TypedValue(id, SpdxConstants.CLASS_SPDX_LICENSE_EXCEPTION));
841+
return Optional.of(new TypedValue(id, SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION));
842842
} else if (crossRefs.containsKey(id)) {
843843
return Optional.of(new TypedValue(id, SpdxConstants.CLASS_CROSS_REF));
844844
} else {
@@ -903,9 +903,9 @@ public Stream<TypedValue> getAllItems(String documentUri, @Nullable String typeF
903903
allItems.add(new TypedValue(licenseId, SpdxConstants.CLASS_SPDX_LISTED_LICENSE));
904904
}
905905
}
906-
if (Objects.isNull(typeFilter) || SpdxConstants.CLASS_SPDX_LICENSE_EXCEPTION.equals(typeFilter)) {
906+
if (Objects.isNull(typeFilter) || SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION.equals(typeFilter)) {
907907
for (String exceptionId:this.exceptionIds.values()) {
908-
allItems.add(new TypedValue(exceptionId, SpdxConstants.CLASS_SPDX_LICENSE_EXCEPTION));
908+
allItems.add(new TypedValue(exceptionId, SpdxConstants.CLASS_SPDX_LISTED_LICENSE_EXCEPTION));
909909
}
910910
}
911911
if (Objects.isNull(typeFilter) || SpdxConstants.CLASS_CROSS_REF.equals(typeFilter)) {

src/test/java/org/spdx/library/model/license/LicenseExpressionParserTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ protected void setUp() throws Exception {
6969
STD_IDS[i], STD_TEXTS[i], new ArrayList<String>(Arrays.asList(new String[] {"URL "+String.valueOf(i)})), "Notes "+String.valueOf(i),
7070
"LicHeader "+String.valueOf(i), "Template "+String.valueOf(i), true, false, "", false, "");
7171
}
72-
LICENSE_EXCEPTIONS = new LicenseException[EXCEPTION_IDS.length];
72+
LICENSE_EXCEPTIONS = new ListedLicenseException[EXCEPTION_IDS.length];
7373
for (int i = 0; i < EXCEPTION_IDS.length; i++) {
74-
LICENSE_EXCEPTIONS[i] = new LicenseException(EXCEPTION_IDS[i], EXCEPTION_NAMES[i], EXCEPTION_TEXTS[i]);
74+
LICENSE_EXCEPTIONS[i] = new ListedLicenseException(EXCEPTION_IDS[i], EXCEPTION_NAMES[i], EXCEPTION_TEXTS[i]);
7575
}
7676

7777
SpdxDocument doc = new SpdxDocument(modelStore, TEST_DOCUMENT_URI, null, true);

0 commit comments

Comments
 (0)