mirror of
https://github.com/corda/corda.git
synced 2025-03-12 15:34:58 +00:00
Tidy up the fetching of types
This commit is contained in:
parent
4ab9241416
commit
fbe234574e
@ -15,9 +15,11 @@ class CustomSerializerCheckpointAdaptor<OBJ, PROXY>(private val userSerializer :
|
|||||||
val cordappType: Type
|
val cordappType: Type
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val types = userSerializer::class.supertypes.filter { it.jvmErasure == SerializationCustomSerializer::class }
|
val types: List<Type> = userSerializer::class
|
||||||
|
.supertypes
|
||||||
|
.filter { it.jvmErasure == SerializationCustomSerializer::class }
|
||||||
.flatMap { it.arguments }
|
.flatMap { it.arguments }
|
||||||
.map { it.type!!.javaType }
|
.mapNotNull { it.type?.javaType }
|
||||||
|
|
||||||
// We are expecting a cordapp type and a proxy type.
|
// We are expecting a cordapp type and a proxy type.
|
||||||
// We will only use the cordapp type in this class
|
// We will only use the cordapp type in this class
|
||||||
|
Loading…
x
Reference in New Issue
Block a user