Skip to content
Permalink
Browse files

Utils: Remove a dependency on ScanSummary.groupedLicenseFindings

The groupedLicenseFindings property is a collection for the type LicenseFindings.
As the LicenseFindings class needs to be refactored reducing the amount of (unnecessary)
dependencies beforehand makes sense. Use the licenseFindings property instead which also
is a tiny bit simpler.

Signed-off-by: Frank Viernau <frank.viernau@here.com>
  • Loading branch information...
fviernau committed Aug 28, 2019
1 parent ace2f2b commit 04646e5076ee9bf877b8da6c39b54b99241d4f13
Showing with 2 additions and 2 deletions.
  1. +2 −2 helper-cli/src/main/kotlin/common/Utils.kt
@@ -187,9 +187,9 @@ internal fun OrtResult.getLicenseFindingsById(id: Identifier): Map<String, Set<T
scanner?.results?.scanResults?.forEach { container ->
container.results.forEach { scanResult ->
if (scanResult.provenance.matches(pkg)) {
scanResult.summary.groupedLicenseFindings.forEach {
scanResult.summary.licenseFindings.forEach {
val locations = result.getOrPut(it.license, { mutableSetOf() })
locations.addAll(it.locations)
locations.add(it.location)
}
}
}

0 comments on commit 04646e5

Please sign in to comment.
You can’t perform that action at this time.