Replace deprecated usages of max/min with maxOrNull/minOrNull
This commit is contained in:
@@ -117,7 +117,7 @@ internal data class DeprecatedByOverridden(private val deprecations: Collection<
|
||||
assert(deprecations.none { it is DeprecatedByOverridden })
|
||||
}
|
||||
|
||||
override val deprecationLevel: DeprecationLevelValue = deprecations.map(Deprecation::deprecationLevel).min()!!
|
||||
override val deprecationLevel: DeprecationLevelValue = deprecations.map(Deprecation::deprecationLevel).minOrNull()!!
|
||||
|
||||
override val target: DeclarationDescriptor
|
||||
get() = deprecations.first().target
|
||||
|
||||
@@ -60,7 +60,7 @@ private data class SinceKotlinValue(
|
||||
private fun getSinceKotlinVersionByOverridden(descriptor: CallableMemberDescriptor): SinceKotlinValue? {
|
||||
// TODO: combine wasExperimentalMarkerClasses in case of several members with the same minimal API version
|
||||
return DescriptorUtils.getAllOverriddenDeclarations(descriptor).map { it.getOwnSinceKotlinVersion() ?: return null }
|
||||
.minBy { it.apiVersion }
|
||||
.minByOrNull { it.apiVersion }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user