We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2901d30 commit 611c2a5Copy full SHA for 611c2a5
plugins/reporters/spdx/src/main/kotlin/Extensions.kt
@@ -288,11 +288,8 @@ internal fun OrtResult.getSpdxFiles(
288
),
289
filename = fileFindings.path,
290
licenseConcluded = SpdxConstants.NOASSERTION,
291
- licenseInfoInFiles = fileFindings.licenses.takeIf { it.isNotEmpty() }?.map { it.toString() }
292
- ?: listOf(SpdxConstants.NONE),
293
- copyrightText = fileFindings.copyrights.sorted().joinToString("\n").takeUnless {
294
- it.isBlank()
295
- } ?: SpdxConstants.NONE
+ licenseInfoInFiles = fileFindings.licenses.map { it.toString() }.ifEmpty { listOf(SpdxConstants.NONE) },
+ copyrightText = fileFindings.copyrights.sorted().joinToString("\n").ifBlank { SpdxConstants.NONE }
296
)
297
}
298
0 commit comments