Skip to content

Commit

Permalink
fix(model): Apply author to copyright mapping also for concluded lice…
Browse files Browse the repository at this point in the history
…nses

As concluded licenses are supposed to trump other licenses, they are
usually taken instead of declared and detected licenses in reports. When
doing do, and the concluded license is not among the other licenses, any
author information that is configured to be mapped to copyrights would be
dropped. To prevent that, apply the same author to copyright mapping that
is done for declared licenses also for concluded licenses.

Fixes #9599.

Signed-off-by: Wolfgang Klenk <[email protected]>
  • Loading branch information
wkl3nk authored and sschuberth committed Dec 19, 2024
1 parent 14b2d68 commit c57a94c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions model/src/main/kotlin/licenses/LicenseInfoResolver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ class LicenseInfoResolver(
licenseInfo.concludedLicenseInfo.concludedLicense?.also {
originalExpressions += ResolvedOriginalExpression(expression = it, source = LicenseSource.CONCLUDED)
}

licenseInfo.declaredLicenseInfo.authors.takeIf { it.isNotEmpty() && addAuthorsToCopyrights }?.also {
locations += resolveCopyrightFromAuthors(it)
}
}
}

Expand Down

0 comments on commit c57a94c

Please sign in to comment.