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:
Rick Parker 2016-10-05 14:00:39 +01:00
commit 8d75fbc433

View File

@ -111,10 +111,10 @@ class HibernateObserver(services: ServiceHubInternal) {
return tx.connection
}
override fun <T : Any?> unwrap(unwrapType: Class<T>?): T {
if (unwrapType == NodeDatabaseConnectionProvider::class.java) {
override fun <T : Any?> unwrap(unwrapType: Class<T>): T {
try {
return unwrapType.cast(this)
} else {
} catch(e: ClassCastException) {
throw UnknownUnwrapTypeException(unwrapType)
}
}