Skip to content

Commit 115a106

Browse files
committed
refactor: Drop an invalid case from getLicenseId()
The SPDX license list won't contain multiple keys for any particular license. So, `otherSpdxLicenseKeys`, if present, may only hold license IDs of the form `LicenseRef-*`. As ORT's ScanCode integration only ever returns either an identifier from the SPDX license list or `LicenseRef-$key`, the values of `otherSpdxLicenseKeys` should be ignored. Signed-off-by: Frank Viernau <[email protected]>
1 parent 1ba19f7 commit 115a106

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/curations/buildSrc/src/main/kotlin/ScanCodeLicenseDbClassifications.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private fun downloadLicenseDetailsBatched(
137137
}
138138

139139
private fun LicenseDetails.getLicenseId(): SpdxSingleLicenseExpression {
140-
val expression = spdxLicenseKey ?: otherSpdxLicenseKeys.firstOrNull() ?: "LicenseRef-scancode-$key"
140+
val expression = spdxLicenseKey ?: "LicenseRef-scancode-$key"
141141
return SpdxSingleLicenseExpression.parse(expression)
142142
}
143143

0 commit comments

Comments
 (0)