Spdx-Java-Library icon indicating copy to clipboard operation
Spdx-Java-Library copied to clipboard

Official CC-BY-4.0 license text is not being matched correctly by LicenseCompareHelper.matchingStandardLicenseIdsWithinText()

Open pmonks opened this issue 6 months ago • 2 comments

When org.spdx.utility.compare.LicenseCompareHelper.matchingStandardLicenseExceptionIdsWithinText() is run on the following CC-BY-*-4.0 license texts, it fails to find any matches:

Furthermore, org.spdx.utility.compare.LicenseCompareHelper.isStandardLicenseWithinText() is also returning false in each of these cases, however org.spdx.utility.compare.LicenseCompareHelper.isTextStandardLicense() (correctly) doesn't find any differences when run on the same texts (and when provided with the appropriate CC-BY-*-4.0 org.spdx.library.model.v3_0_1.expandedlicensing.ListedLicense object).

Perhaps we should add one or more CC-BY- cases to the compare consistency unit test?

This was reproduced with Spdx-Java-Library v2.0.0 and SPDX license list v3.26.0.

pmonks avatar Apr 30 '25 17:04 pmonks