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.
applyPackageCurations()
1 parent e7060ff commit 4554b6eCopy full SHA for 4554b6e
model/src/main/kotlin/OrtResult.kt
@@ -699,14 +699,9 @@ internal fun applyPackageCurations(
699
packages: Collection<Package>,
700
curations: List<PackageCuration>
701
): Set<CuratedPackage> {
702
- val curationsForId = packages.associateBy(
703
- keySelector = { pkg -> pkg.id },
704
- valueTransform = { pkg ->
705
- curations.filter { curation ->
706
- curation.isApplicable(pkg.id)
707
- }
708
709
- )
+ val curationsForId = packages.associate { pkg ->
+ pkg.id to curations.filter { it.isApplicable(pkg.id) }
+ }
710
711
return packages.mapTo(mutableSetOf()) { pkg ->
712
curationsForId[pkg.id].orEmpty().asReversed().fold(pkg.toCuratedPackage()) { cur, packageCuration ->
0 commit comments