Fix for CORDA-2972. (#5185)

This commit is contained in:
Roger Willis 2019-06-04 11:21:56 +01:00 committed by GitHub
parent e1853f50d4
commit 1fc7405c7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ import net.corda.core.serialization.CordaSerializable
import net.corda.core.serialization.SingletonSerializeAsToken
import java.lang.reflect.ParameterizedType
import java.lang.reflect.Type
import java.lang.reflect.TypeVariable
import java.util.*
import kotlin.reflect.KFunction
import kotlin.reflect.KParameter
@ -156,6 +157,8 @@ open class FlowLogicRefFactoryImpl(private val classloader: ClassLoader) : Singl
}
} else if (type is ParameterizedType) {
parameterAssignableFrom(type.rawType, value)
} else if (type is TypeVariable<*>) {
type.bounds.all { parameterAssignableFrom(it, value) }
} else {
false
}