Replace all throw error(...) with just error(...)
`throw` is not needed in this case, because `error(...)` already raises exception (so `throw` is unreachable). Also after previous commit compiler reports `UNREACHABLE_CODE` warning on such `throw`
This commit is contained in:
committed by
TeamCityServer
parent
ae608ea67f
commit
3f5e6a79c7
+2
-2
@@ -59,7 +59,7 @@ fun findLastVersions(packages: List<PackageInformation>): List<Package> {
|
||||
.filter { it.preRelease == null && it.build == null }
|
||||
.maxOrNull()
|
||||
?.toString()
|
||||
?: throw error("There is no applicable version for ${packageInformation.name}")
|
||||
?: error("There is no applicable version for ${packageInformation.name}")
|
||||
is HardcodedPackageInformation -> packageInformation.version
|
||||
}
|
||||
|
||||
@@ -69,4 +69,4 @@ fun findLastVersions(packages: List<PackageInformation>): List<Package> {
|
||||
packageInformation.displayName
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user