diff --git a/src/dorkbox/serializers/SerializationManager.kt b/src/dorkbox/serializers/SerializationManager.kt index 651d473..5c7b706 100644 --- a/src/dorkbox/serializers/SerializationManager.kt +++ b/src/dorkbox/serializers/SerializationManager.kt @@ -32,7 +32,7 @@ interface SerializationManager { * Because the ID assigned is affected by the IDs registered before it, the order classes are registered is important when using this * method. The order must be the same at deserialization as it was for serialization. */ - fun register(clazz: Class?): SerializationManager<*>? + fun register(clazz: Class): SerializationManager<*> /** * Registers the class using the specified ID. If the ID is already in use by the same type, the old entry is overwritten. If the ID @@ -47,7 +47,7 @@ interface SerializationManager { * @param id Must be >= 0. Smaller IDs are serialized more efficiently. IDs 0-8 are used by default for primitive types and String, but * these IDs can be repurposed. */ - fun register(clazz: Class?, id: Int): SerializationManager<*>? + fun register(clazz: Class, id: Int): SerializationManager<*> /** * Registers the class using the lowest, next available integer ID and the specified serializer. If the class is already registered, @@ -60,7 +60,7 @@ interface SerializationManager { * Because the ID assigned is affected by the IDs registered before it, the order classes are registered is important when using this * method. The order must be the same at deserialization as it was for serialization. */ - fun register(clazz: Class?, serializer: Serializer?): SerializationManager<*>? + fun register(clazz: Class, serializer: Serializer): SerializationManager<*> /** * Registers the class using the specified ID and serializer. If the ID is already in use by the same type, the old entry is @@ -75,12 +75,11 @@ interface SerializationManager { * @param id Must be >= 0. Smaller IDs are serialized more efficiently. IDs 0-8 are used by default for primitive types and String, but * these IDs can be repurposed. */ - fun register(clazz: Class?, serializer: Serializer?, id: Int): SerializationManager<*>? + fun register(clazz: Class, serializer: Serializer, id: Int): SerializationManager<*> /** * Waits until a kryo is available to write, using CAS operations to prevent having to synchronize. * - * * There is a small speed penalty if there were no kryo's available to use. */ @Throws(IOException::class) @@ -98,11 +97,11 @@ interface SerializationManager { * Writes the class and object using an available kryo instance */ @Throws(IOException::class) - fun writeFullClassAndObject(output: Output?, value: Any?) + fun writeFullClassAndObject(output: Output, value: Any?) /** * Returns a class read from the input */ @Throws(IOException::class) - fun readFullClassAndObject(input: Input?): Any? + fun readFullClassAndObject(input: Input): Any? }