diff --git a/plugins/reporters/aosd/src/main/kotlin/Aosd21Reporter.kt b/plugins/reporters/aosd/src/main/kotlin/Aosd21Reporter.kt index 8804ff2904d01..21d2986af3660 100644 --- a/plugins/reporters/aosd/src/main/kotlin/Aosd21Reporter.kt +++ b/plugins/reporters/aosd/src/main/kotlin/Aosd21Reporter.kt @@ -92,6 +92,7 @@ private fun Map<Identifier, IndexedValue<CuratedPackage>>.toComponents( .applyChoices(input.ortResult.getRepositoryLicenseChoices()) val selectedExpressions = selectedLicenseInfo.toSimplifiedCompoundExpression() + .takeUnless { it == licenseExpressions } val licenseTexts = licenseExpressions.licenses().mapNotNullTo(mutableSetOf()) { license -> input.licenseTextProvider.getLicenseText(license) @@ -116,7 +117,7 @@ private fun Map<Identifier, IndexedValue<CuratedPackage>>.toComponents( licenseText = licenseTexts, // Can be empty as the license information is the result of a file level scan. licenseTextUrl = "", - selectedLicense = selectedExpressions.nullOrBlankToSpdxNoassertionOrNone() + selectedLicense = selectedExpressions?.toString().orEmpty() ).validate() ) ).validate()