Skip to content

Commit 19da2db

Browse files
committed
chore(model): Prefer entries over values() for enums
This also avoids the need for the `toList()` conversion. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 40fa386 commit 19da2db

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

model/src/test/kotlin/licenses/ResolvedLicenseInfoTest.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,7 @@ private val RESOLVED_LICENSE_INFO: ResolvedLicenseInfo by lazy {
229229
* effectiveLicense(), rather computation-heavy.
230230
*/
231231
private val COMPUTATION_HEAVY_RESOLVED_LICENSE_INFO: ResolvedLicenseInfo by lazy {
232-
val licensesWithoutChoice = SpdxLicense.values()
233-
.toList()
234-
.subList(0, 200)
235-
.map { SpdxExpression.parse(it.id) }
232+
val licensesWithoutChoice = SpdxLicense.entries.subList(0, 200).map { SpdxExpression.parse(it.id) }
236233

237234
// Expressions taken from a real world scan with swapped identifiers.
238235
val licensesWithChoice = listOf(

0 commit comments

Comments
 (0)