From 23292543903a3066086c1ebe917d909a773c2db6 Mon Sep 17 00:00:00 2001 From: Katelyn Baker Date: Fri, 8 Dec 2017 17:00:15 +0000 Subject: [PATCH] Additional comment corrections --- .../CordaSerializationTransformRename.kt | 2 +- .../internal/serialization/amqp/ArraySerializer.kt | 2 +- .../serialization/amqp/EvolutionSerializer.kt | 14 +++++++------- .../internal/serialization/carpenter/Schema.kt | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/src/main/kotlin/net/corda/core/serialization/CordaSerializationTransformRename.kt b/core/src/main/kotlin/net/corda/core/serialization/CordaSerializationTransformRename.kt index abd556bb991..dc37459899f 100644 --- a/core/src/main/kotlin/net/corda/core/serialization/CordaSerializationTransformRename.kt +++ b/core/src/main/kotlin/net/corda/core/serialization/CordaSerializationTransformRename.kt @@ -19,7 +19,7 @@ annotation class CordaSerializationTransformRenames(vararg val value: CordaSeria /** * This annotation is used to mark a class has having had a property element. It is used by the * AMQP deserializer to allow instances with different versions of the class on their Class Path - * to successfully deserialize the object + * to successfully deserialize the object. * * NOTE: Renaming of the class itself isn't done with this annotation or, at present, supported * by Corda diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/amqp/ArraySerializer.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/amqp/ArraySerializer.kt index 06ddb2b264a..46046a88f26 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/amqp/ArraySerializer.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/amqp/ArraySerializer.kt @@ -22,7 +22,7 @@ open class ArraySerializer(override val type: Type, factory: SerializerFactory) // for example). // // We *need* to retain knowledge for AMQP deserialization weather that lowest primitive - // was boxed or unboxed so just infer it recursively + // was boxed or unboxed so just infer it recursively. private fun calcTypeName(type: Type): String = if (type.componentType().isArray()) { val typeName = calcTypeName(type.componentType()); "$typeName[]" diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/amqp/EvolutionSerializer.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/amqp/EvolutionSerializer.kt index f06980e7fb1..797943cf935 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/amqp/EvolutionSerializer.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/amqp/EvolutionSerializer.kt @@ -11,7 +11,7 @@ import kotlin.reflect.jvm.javaType /** * Serializer for deserializing objects whose definition has changed since they - * were serialised + * were serialised. */ class EvolutionSerializer( clazz: Type, @@ -40,9 +40,9 @@ class EvolutionSerializer( /** * Unlike the generic deserialization case where we need to locate the primary constructor * for the object (or our best guess) in the case of an object whose structure has changed - * since serialisation we need to attempt to locate a constructor that we can use. I.e. - * it's parameters match the serialised members and it will initialise any newly added - * elements + * since serialisation we need to attempt to locate a constructor that we can use. For example, + * its parameters match the serialised members and it will initialise any newly added + * elements. * * TODO: Type evolution * TODO: rename annotation @@ -70,8 +70,8 @@ class EvolutionSerializer( } /** - * Build a serialization object for deserialisation only of objects serialised - * as different versions of a class + * Build a serialization object for deserialization only of objects serialised + * as different versions of a class. * * @param old is an object holding the schema that represents the object * as it was serialised and the type descriptor of that type @@ -119,7 +119,7 @@ class EvolutionSerializer( * to the object list of values we need to map that list, which is ordered per the * constructor of the original state of the object, we need to map the new parameter order * of the current constructor onto that list inserting nulls where new parameters are - * encountered + * encountered. * * TODO: Object references */ diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/carpenter/Schema.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/carpenter/Schema.kt index 3660ce4d6d4..a5de6bf2b09 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/carpenter/Schema.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/serialization/carpenter/Schema.kt @@ -62,7 +62,7 @@ fun EnumMap.simpleFieldAccess(): Boolean { } /** - * Represents a concrete object + * Represents a concrete object. */ class ClassSchema( name: String, @@ -77,7 +77,7 @@ class ClassSchema( /** * Represents an interface. Carpented interfaces can be used within [ClassSchema]s - * if that class should be implementing that interface + * if that class should be implementing that interface. */ class InterfaceSchema( name: String, @@ -91,7 +91,7 @@ class InterfaceSchema( } /** - * Represents an enumerated type + * Represents an enumerated type. */ class EnumSchema( name: String, @@ -112,7 +112,7 @@ class EnumSchema( /** * Factory object used by the serializer when building [Schema]s based - * on an AMQP schema + * on an AMQP schema. */ object CarpenterSchemaFactory { fun newInstance(