mirror of
https://github.com/corda/corda.git
synced 2025-01-25 21:59:22 +00:00
Merged in fix-kotlin-cast-error (pull request #396)
Fix kotlin 1.0.4 error on use of Class.cast()
This commit is contained in:
commit
8d75fbc433
@ -111,10 +111,10 @@ class HibernateObserver(services: ServiceHubInternal) {
|
|||||||
return tx.connection
|
return tx.connection
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun <T : Any?> unwrap(unwrapType: Class<T>?): T {
|
override fun <T : Any?> unwrap(unwrapType: Class<T>): T {
|
||||||
if (unwrapType == NodeDatabaseConnectionProvider::class.java) {
|
try {
|
||||||
return unwrapType.cast(this)
|
return unwrapType.cast(this)
|
||||||
} else {
|
} catch(e: ClassCastException) {
|
||||||
throw UnknownUnwrapTypeException(unwrapType)
|
throw UnknownUnwrapTypeException(unwrapType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user