diff --git a/KotlinOutputFiles/DateFactory.kt b/KotlinOutputFiles/DateFactory.kt index 64604fa..611026d 100644 --- a/KotlinOutputFiles/DateFactory.kt +++ b/KotlinOutputFiles/DateFactory.kt @@ -5,8 +5,8 @@ import java.lang.reflect.Type class DateFactory : JsonAdapter.Factory { override fun create(type: Type, annotations: Set, moshi: Moshi): JsonAdapter<*>? { - val typeName = when(type) { - is Class<*> -> type.canonicalName + val typeName: String = when(type) { + is Class<*> -> type.canonicalName ?: type.toString() else -> type.toString() }