Review comments

This commit is contained in:
Kat Baker 2018-04-12 11:58:56 +01:00
parent c783c431b1
commit 03850dabc2
3 changed files with 5 additions and 5 deletions

View File

@ -7,8 +7,8 @@ release, see :doc:`upgrade-notes`.
Unreleased Unreleased
========== ==========
* Fix CORDA-1229. Setter based serialization was broken with generic types when the property was stored * Fix CORDA-1229. Setter-based serialization was broken with generic types when the property was stored
as the interface type, List for example. as the raw type, List for example.
* java.security.cert.CRLReason added to the default Whitelist. * java.security.cert.CRLReason added to the default Whitelist.

View File

@ -314,7 +314,7 @@ fun propertiesForSerializationFromSetters(
"${property.value.field?.genericType!!}") "${property.value.field?.genericType!!}")
} }
// make sure the getter returns the same type (within inheritance bounds) the setter accepts // Make sure the getter returns the same type (within inheritance bounds) the setter accepts.
if (!(TypeToken.of (getter.genericReturnType).isSupertypeOf(setterType))) { if (!(TypeToken.of (getter.genericReturnType).isSupertypeOf(setterType))) {
throw NotSerializableException("Defined setter for parameter ${property.value.field?.name} " + throw NotSerializableException("Defined setter for parameter ${property.value.field?.name} " +
"takes parameter of type $setterType yet the defined getter returns a value of type " + "takes parameter of type $setterType yet the defined getter returns a value of type " +

View File

@ -345,8 +345,8 @@ public class SetterConstructorTests {
evolutionSerialiserGetter, evolutionSerialiserGetter,
fingerPrinter); fingerPrinter);
// if we've got super / sub types on the setter vs the unerlaying type the wrong way around this will // if we've got super / sub types on the setter vs the underlying type the wrong way around this will
// explode // explode. See CORDA-1229 (https://r3-cev.atlassian.net/browse/CORDA-1229)
new SerializationOutput(factory1).serialize(cil); new SerializationOutput(factory1).serialize(cil);
} }
} }