Skip to content

Commit d777dd6

Browse files
committed
chore(spdx-utils): Add types to SpdxSimpleLicenseMapping properties
Make these explicit for clarity. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 88015b4 commit d777dd6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

utils/spdx/src/main/kotlin/SpdxSimpleLicenseMapping.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ object SpdxSimpleLicenseMapping {
3030
/**
3131
* The map of simple license names associated with their corresponding [SPDX license][SpdxLicense].
3232
*/
33-
internal val simpleLicenseMapping by lazy {
33+
internal val simpleLicenseMapping: Map<String, SpdxLicense> by lazy {
3434
val resource = checkNotNull(javaClass.getResource("/simple-license-mapping.yml"))
35-
yamlMapper.readValue<Map<String, SpdxLicense>>(resource)
35+
yamlMapper.readValue(resource)
3636
}
3737

3838
/**
3939
* The map of simple license names associated with their corresponding [SPDX expression][SpdxLicenseIdExpression].
4040
*/
41-
val simpleExpressionMapping by lazy {
41+
val simpleExpressionMapping: Map<String, SpdxLicenseIdExpression> by lazy {
4242
simpleLicenseMapping.mapValuesTo(sortedMapOf(String.CASE_INSENSITIVE_ORDER)) { (_, v) -> v.toExpression() }
4343
}
4444

4545
/**
4646
* The map of deprecated SPDX license IDs associated with their current [SPDX expression]
4747
* [SpdxSingleLicenseExpression].
4848
*/
49-
val deprecatedExpressionMapping by lazy {
49+
val deprecatedExpressionMapping: Map<String, SpdxSingleLicenseExpression> by lazy {
5050
val resource = checkNotNull(javaClass.getResource("/deprecated-license-mapping.yml"))
5151
val mapping = yamlMapper.readValue<Map<String, SpdxSingleLicenseExpression>>(resource)
5252
mapping.toSortedMap(String.CASE_INSENSITIVE_ORDER)

0 commit comments

Comments
 (0)