Fix typo. (Doh!)

This commit is contained in:
Chris Rankin 2019-09-12 16:34:20 +01:00
parent 7af8011649
commit 842888ac1b
3 changed files with 4 additions and 4 deletions

View File

@ -188,7 +188,7 @@ class DeserializationInput constructor(
// Store the reference in case we need it later on. // Store the reference in case we need it later on.
// Skip for primitive types as they are too small and overhead of referencing them will be much higher // Skip for primitive types as they are too small and overhead of referencing them will be much higher
// than their content // than their content
if (serializerFactory.isSuitebleForObjectReference(objectRead.javaClass)) { if (serializerFactory.isSuitableForObjectReference(objectRead.javaClass)) {
objectHistory.add(objectRead) objectHistory.add(objectRead)
} }
objectRead objectRead

View File

@ -83,7 +83,7 @@ interface LocalSerializerFactory {
* Determines whether instances of this type should be added to the object history * Determines whether instances of this type should be added to the object history
* when serialising and deserialising. * when serialising and deserialising.
*/ */
fun isSuitebleForObjectReference(type: Type): Boolean fun isSuitableForObjectReference(type: Type): Boolean
} }
/** /**
@ -136,7 +136,7 @@ class DefaultLocalSerializerFactory(
get(typeInformation.observedType, typeInformation) get(typeInformation.observedType, typeInformation)
// ByteArrays, primitives and boxed primitives are not stored in the object history // ByteArrays, primitives and boxed primitives are not stored in the object history
override fun isSuitebleForObjectReference(type: Type): Boolean { override fun isSuitableForObjectReference(type: Type): Boolean {
val clazz = type.asClass() val clazz = type.asClass()
return type != ByteArray::class.java && !isPrimitiveType.test(clazz) return type != ByteArray::class.java && !isPrimitiveType.test(clazz)
} }

View File

@ -137,7 +137,7 @@ open class SerializationOutput constructor(
// Important to do it after serialization such that dependent object will have preceding reference numbers // Important to do it after serialization such that dependent object will have preceding reference numbers
// assigned to them first as they will be first read from the stream on receiving end. // assigned to them first as they will be first read from the stream on receiving end.
// Skip for primitive types as they are too small and overhead of referencing them will be much higher than their content // Skip for primitive types as they are too small and overhead of referencing them will be much higher than their content
if (serializerFactory.isSuitebleForObjectReference(obj.javaClass)) { if (serializerFactory.isSuitableForObjectReference(obj.javaClass)) {
objectHistory[obj] = objectHistory.size objectHistory[obj] = objectHistory.size
} }
} else { } else {