File tree 5 files changed +8
-8
lines changed
5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ fun Task.generateEnumClass(
271
271
| * The map which associates SPDX exceptions with their applicable SPDX licenses.
272
272
| */
273
273
| val mapping by lazy {
274
- | val resource = SpdxLicenseException::class.java.getResource("/exception-mapping.yml")
274
+ | val resource = checkNotNull( SpdxLicenseException::class.java.getResource("/exception-mapping.yml") )
275
275
| yamlMapper.readValue<Map<String, List<SpdxLicense>>>(resource)
276
276
| }
277
277
|
@@ -300,7 +300,7 @@ fun Task.generateEnumClass(
300
300
| /**
301
301
| * The full $description text as a string.
302
302
| */
303
- | val text by lazy { javaClass.getResource("/$resourcePath /${' $' } id").readText() }
303
+ | val text by lazy { checkNotNull( javaClass.getResource("/$resourcePath /${' $' } id") ).readText() }
304
304
|}
305
305
|
306
306
""" .trimMargin()
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ object SpdxDeclaredLicenseMapping {
31
31
* The raw map which associates collected license strings with their corresponding SPDX expression.
32
32
*/
33
33
internal val rawMapping by lazy {
34
- val resource = javaClass.getResource(" /declared-license-mapping.yml" )
34
+ val resource = checkNotNull( javaClass.getResource(" /declared-license-mapping.yml" ) )
35
35
yamlMapper.readValue<Map <String , SpdxExpression >>(resource)
36
36
}
37
37
Original file line number Diff line number Diff line change @@ -743,5 +743,5 @@ enum class SpdxLicense(
743
743
/* *
744
744
* The full license text as a string.
745
745
*/
746
- val text by lazy { javaClass.getResource(" /licenses/$id " ).readText() }
746
+ val text by lazy { checkNotNull( javaClass.getResource(" /licenses/$id " ) ).readText() }
747
747
}
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ enum class SpdxLicenseException(
128
128
* The map which associates SPDX exceptions with their applicable SPDX licenses.
129
129
*/
130
130
val mapping by lazy {
131
- val resource = SpdxLicenseException ::class .java.getResource(" /exception-mapping.yml" )
131
+ val resource = checkNotNull( SpdxLicenseException ::class .java.getResource(" /exception-mapping.yml" ) )
132
132
yamlMapper.readValue<Map <String , List <SpdxLicense >>>(resource)
133
133
}
134
134
@@ -144,5 +144,5 @@ enum class SpdxLicenseException(
144
144
/* *
145
145
* The full license exception text as a string.
146
146
*/
147
- val text by lazy { javaClass.getResource(" /exceptions/$id " ).readText() }
147
+ val text by lazy { checkNotNull( javaClass.getResource(" /exceptions/$id " ) ).readText() }
148
148
}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ object SpdxSimpleLicenseMapping {
31
31
* The raw map which associates custom license IDs with their corresponding SPDX license ID.
32
32
*/
33
33
internal val customLicenseIdsMap by lazy {
34
- val resource = javaClass.getResource(" /simple-license-mapping.yml" )
34
+ val resource = checkNotNull( javaClass.getResource(" /simple-license-mapping.yml" ) )
35
35
yamlMapper.readValue<Map <String , SpdxLicense >>(resource)
36
36
}
37
37
@@ -45,7 +45,7 @@ object SpdxSimpleLicenseMapping {
45
45
* The map of deprecated SPDX license ids associated with their current SPDX expression.
46
46
*/
47
47
private val deprecatedLicenseIds by lazy {
48
- val resource = javaClass.getResource(" /deprecated-license-mapping.yml" )
48
+ val resource = checkNotNull( javaClass.getResource(" /deprecated-license-mapping.yml" ) )
49
49
yamlMapper.readValue<Map <String , SpdxSingleLicenseExpression >>(resource)
50
50
}
51
51
You can’t perform that action at this time.
0 commit comments