mirror of
https://github.com/corda/corda.git
synced 2025-01-18 02:39:51 +00:00
changed the ServiceLoader.load call to use the class loader used to load the DefaultKryoCustomizer class instead of the default of using the thread context loader. This allows apps that use custom class loader hierarchies to use corda jars. All tests still pass
This commit is contained in:
parent
4487408526
commit
c721316d67
@ -47,7 +47,7 @@ object DefaultKryoCustomizer {
|
||||
// No ClassResolver only constructor. MapReferenceResolver is the default as used by Kryo in other constructors.
|
||||
val unusedKryo = Kryo(makeStandardClassResolver(), MapReferenceResolver())
|
||||
val customization = KryoSerializationCustomization(unusedKryo)
|
||||
ServiceLoader.load(CordaPluginRegistry::class.java).toList().filter { it.customizeSerialization(customization) }
|
||||
ServiceLoader.load(CordaPluginRegistry::class.java, this.javaClass.classLoader).toList().filter { it.customizeSerialization(customization) }
|
||||
}
|
||||
|
||||
fun customize(kryo: Kryo): Kryo {
|
||||
|
Loading…
Reference in New Issue
Block a user