solution: upgrade Kotlin to 1.5

This commit is contained in:
Igor Artamonov
2021-09-15 21:30:05 -04:00
parent 199259afdb
commit 1576f1fe64
36 changed files with 89 additions and 70 deletions

View File

@@ -27,6 +27,7 @@ import org.slf4j.LoggerFactory
import org.springframework.context.Lifecycle
import reactor.core.publisher.Mono
@Suppress("UNCHECKED_CAST")
open class BitcoinMultistream(
chain: Chain,
val upstreams: MutableList<BitcoinUpstream>,
@@ -108,6 +109,7 @@ open class BitcoinMultistream(
return upstreams.flatMap { it.getLabels() }
}
@Suppress("UNCHECKED_CAST")
override fun <T : Upstream> cast(selfType: Class<T>): T {
if (!selfType.isAssignableFrom(this.javaClass)) {
throw ClassCastException("Cannot cast ${this.javaClass} to $selfType")