mirror of
https://github.com/corda/corda.git
synced 2025-06-23 01:19:00 +00:00
Corda-1869 serialisation refactor (#3780)
* Pull out and tidy type parameter inference * Contain null proliferation * Extract fingerprinter state * SerializerFingerPrinter is always initialised with a SerializerFactory * Move non-recursive state transition functions into state * Move all state transition functions into state * Simplify and optimise with mutable state * Move TypeParameterUtils back into internal.amqp * Clarify behaviour of constructorForDeserialisation * constructorForDeserialization no longer returns null * Capture field properties * Narrow PropertyDescriptor * Use map rather than apply on a mutable list * Remove printStackTrace added for debugging * CORDA-1869 minor tweaks * Use groupingBy to avoid creating an intermediate map * Convert some functional origami to plain old for-loops * Eliminate nested lambda to unbreak pre-serialisation * Use EnumMap for map of Enums
This commit is contained in:
@ -15,10 +15,6 @@ class FingerPrinterTesting : FingerPrinter {
|
||||
return cache.computeIfAbsent(type) { index++.toString() }
|
||||
}
|
||||
|
||||
override fun setOwner(factory: SerializerFactory) {
|
||||
return
|
||||
}
|
||||
|
||||
@Suppress("UNUSED")
|
||||
fun changeFingerprint(type: Type) {
|
||||
cache.computeIfAbsent(type) { "" }.apply { index++.toString() }
|
||||
@ -47,7 +43,7 @@ class FingerPrinterTestingTests {
|
||||
AllWhitelist,
|
||||
ClassLoader.getSystemClassLoader(),
|
||||
evolutionSerializerGetter = EvolutionSerializerGetterTesting(),
|
||||
fingerPrinter = FingerPrinterTesting())
|
||||
fingerPrinterConstructor = { _ -> FingerPrinterTesting() })
|
||||
|
||||
val blob = TestSerializationOutput(VERBOSE, factory).serializeAndReturnSchema(C(1, 2L))
|
||||
|
||||
|
Reference in New Issue
Block a user