mirror of
https://github.com/corda/corda.git
synced 2025-04-16 07:27:17 +00:00
Tidy up changes for review.
This commit is contained in:
parent
b2d335c518
commit
4ebd02bc04
@ -192,7 +192,8 @@ object EvolutionPropertyWriteStrategy : PropertyWriteStrategy {
|
||||
* Read a type that comes with its own [TypeDescriptor], by calling back into [RemoteSerializerFactory] to obtain a suitable
|
||||
* serializer for that descriptor.
|
||||
*/
|
||||
class DescribedTypeReadStrategy(name: String, typeIdentifier: TypeIdentifier,
|
||||
class DescribedTypeReadStrategy(name: String,
|
||||
typeIdentifier: TypeIdentifier,
|
||||
private val type: Type): PropertyReadStrategy {
|
||||
|
||||
private val nameForDebug = "$name(${typeIdentifier.prettyPrint(false)})"
|
||||
|
@ -17,16 +17,18 @@ object SerializerFactoryBuilder {
|
||||
* The DJVM will need to override these, but probably not anyone else.
|
||||
*/
|
||||
@Suppress("unchecked_cast")
|
||||
private val javaPrimitiveTypes: Map<Class<*>, Class<*>> = unmodifiableMap(mapOf<Class<out Any>?, Class<out Any>?>(
|
||||
Boolean::class.javaObjectType to Boolean::class.javaPrimitiveType,
|
||||
Byte::class.javaObjectType to Byte::class.javaPrimitiveType,
|
||||
Char::class.javaObjectType to Char::class.javaPrimitiveType,
|
||||
Double::class.javaObjectType to Double::class.javaPrimitiveType,
|
||||
Float::class.javaObjectType to Float::class.javaPrimitiveType,
|
||||
Int::class.javaObjectType to Int::class.javaPrimitiveType,
|
||||
Long::class.javaObjectType to Long::class.javaPrimitiveType,
|
||||
Short::class.javaObjectType to Short::class.javaPrimitiveType
|
||||
)) as Map<Class<*>, Class<*>>
|
||||
private val javaPrimitiveTypes: Map<Class<*>, Class<*>> = unmodifiableMap(listOf(
|
||||
Boolean::class,
|
||||
Byte::class,
|
||||
Char::class,
|
||||
Double::class,
|
||||
Float::class,
|
||||
Int::class,
|
||||
Long::class,
|
||||
Short::class
|
||||
).associate {
|
||||
klazz -> klazz.javaObjectType to klazz.javaPrimitiveType
|
||||
}) as Map<Class<*>, Class<*>>
|
||||
|
||||
@JvmStatic
|
||||
fun build(whitelist: ClassWhitelist, classCarpenter: ClassCarpenter): SerializerFactory {
|
||||
|
Loading…
x
Reference in New Issue
Block a user