mirror of
https://github.com/corda/corda.git
synced 2025-06-13 20:58:19 +00:00
CORDA-540: Special provisions when artificial "AnyType" is used
This commit is contained in:
committed by
Viktor Kolomeyko
parent
a01f390515
commit
cac2465ea5
@ -126,7 +126,7 @@ class DeserializationInput(internal val serializerFactory: SerializerFactory) {
|
|||||||
is DescribedType -> {
|
is DescribedType -> {
|
||||||
// Look up serializer in factory by descriptor
|
// Look up serializer in factory by descriptor
|
||||||
val serializer = serializerFactory.get(obj.descriptor, schema)
|
val serializer = serializerFactory.get(obj.descriptor, schema)
|
||||||
if (serializer.type != type && with(serializer.type) { !isSubClassOf(type) && !materiallyEquivalentTo(type) })
|
if (SerializerFactory.AnyType != type && serializer.type != type && with(serializer.type) { !isSubClassOf(type) && !materiallyEquivalentTo(type) })
|
||||||
throw NotSerializableException("Described type with descriptor ${obj.descriptor} was " +
|
throw NotSerializableException("Described type with descriptor ${obj.descriptor} was " +
|
||||||
"expected to be of type $type but was ${serializer.type}")
|
"expected to be of type $type but was ${serializer.type}")
|
||||||
serializer.readObject(obj.described, schema, this)
|
serializer.readObject(obj.described, schema, this)
|
||||||
|
Reference in New Issue
Block a user