From 73779ed3b1592f93569244d10ebd0626642e4496 Mon Sep 17 00:00:00 2001 From: Gary O'Neall Date: Thu, 12 Mar 2026 13:35:49 -0700 Subject: [PATCH] Add back exception signature Add back the InvalidLicenseStringException to the parseSPDXLicenseStringCompatV2 license signature. The previous PR removed this due to a compiler warning. The change, however, breaks compatibility (e.g. the spdx-java-spreadsheet-store no longer compiles with the signature removed). We could / should remove it in the future but it may be considered a breaking change. Not something for a patch release. Signed-off-by: Gary O'Neall --- src/main/java/org/spdx/library/LicenseInfoFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/spdx/library/LicenseInfoFactory.java b/src/main/java/org/spdx/library/LicenseInfoFactory.java index 5ee13ee35..89ff65f50 100644 --- a/src/main/java/org/spdx/library/LicenseInfoFactory.java +++ b/src/main/java/org/spdx/library/LicenseInfoFactory.java @@ -96,7 +96,7 @@ public static SpdxListedLicense getListedLicenseByIdCompatV2(String licenseId)th * @throws DefaultStoreNotInitializedException if the default model store is not initialized */ public static org.spdx.library.model.v2.license.AnyLicenseInfo parseSPDXLicenseStringCompatV2(String licenseString, @Nullable IModelStore store, - @Nullable String documentUri, @Nullable IModelCopyManager copyManager) throws DefaultStoreNotInitializedException { + @Nullable String documentUri, @Nullable IModelCopyManager copyManager) throws InvalidLicenseStringException, DefaultStoreNotInitializedException { if (Objects.isNull(store)) { store = DefaultModelStore.getDefaultModelStore(); }