mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
CORDA-786 - Use reflection to infer proxy and proxied types in CorDapp custom serializers
This removes any need for the user implement and override types from the super class * CORDA-786 - Docs update * CORDA-786 - Remove unneeded second annotation on the proxy objects * Fix merge conflicts
This commit is contained in:
@ -181,7 +181,6 @@ class CordappLoader private constructor(private val cordappJarPaths: List<Restri
|
||||
schedulableFlows = listOf(),
|
||||
services = listOf(),
|
||||
serializationWhitelists = listOf(),
|
||||
serializationCustomSerializerProxies = listOf(),
|
||||
serializationCustomSerializers = listOf(),
|
||||
customSchemas = setOf(),
|
||||
jarPath = ContractUpgradeFlow.javaClass.protectionDomain.codeSource.location // Core JAR location
|
||||
@ -198,7 +197,6 @@ class CordappLoader private constructor(private val cordappJarPaths: List<Restri
|
||||
findSchedulableFlows(scanResult),
|
||||
findServices(scanResult),
|
||||
findPlugins(it),
|
||||
findSerialiserProxies(scanResult),
|
||||
findSerialzers(scanResult),
|
||||
findCustomSchemas(scanResult),
|
||||
it.url)
|
||||
@ -250,10 +248,6 @@ class CordappLoader private constructor(private val cordappJarPaths: List<Restri
|
||||
} + DefaultWhitelist // Always add the DefaultWhitelist to the whitelist for an app.
|
||||
}
|
||||
|
||||
private fun findSerialiserProxies(scanResult: RestrictedScanResult) : List<Class<*>> {
|
||||
return scanResult.getClassesWithAnnotation(Class::class, CordaCustomSerializerProxy::class)
|
||||
}
|
||||
|
||||
private fun findSerialzers(scanResult: RestrictedScanResult) : List<Class<out SerializationCustomSerializer<*, *>>> {
|
||||
return scanResult.getClassesWithAnnotation(SerializationCustomSerializer::class, CordaCustomSerializer::class)
|
||||
}
|
||||
|
Reference in New Issue
Block a user