No public key serializer overriding for checkpointing

This commit is contained in:
Christian Sailer 2017-11-09 15:23:12 +00:00
parent 89b01ab342
commit 26819bfd04

View File

@ -54,7 +54,8 @@ abstract class AbstractKryoSerializationScheme : SerializationScheme {
val field = Kryo::class.java.getDeclaredField("classResolver").apply { isAccessible = true } val field = Kryo::class.java.getDeclaredField("classResolver").apply { isAccessible = true }
serializer.kryo.apply { serializer.kryo.apply {
field.set(this, classResolver) field.set(this, classResolver)
DefaultKryoCustomizer.customize(this, publicKeySerializer) // don't allow overriding the public key serializer for checkpointing
DefaultKryoCustomizer.customize(this)
addDefaultSerializer(AutoCloseable::class.java, AutoCloseableSerialisationDetector) addDefaultSerializer(AutoCloseable::class.java, AutoCloseableSerialisationDetector)
register(ClosureSerializer.Closure::class.java, CordaClosureSerializer) register(ClosureSerializer.Closure::class.java, CordaClosureSerializer)
classLoader = it.second classLoader = it.second