From 1340ef89355e428e81200c8dc1525ee645ffb86a Mon Sep 17 00:00:00 2001 From: Eric Cochran Date: Mon, 24 Jul 2017 11:06:22 -0700 Subject: [PATCH] JsonAdapter.Factory.create rejects the null Type. This fails already in Types.getRawType, but a compiler error is preferable. --- kotlin/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kotlin/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt b/kotlin/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt index 4d0462f..2adfb34 100644 --- a/kotlin/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt +++ b/kotlin/src/main/java/com/squareup/moshi/KotlinJsonAdapter.kt @@ -148,7 +148,7 @@ internal class KotlinJsonAdapter( } class KotlinJsonAdapterFactory : JsonAdapter.Factory { - override fun create(type: Type?, annotations: MutableSet, moshi: Moshi) + override fun create(type: Type, annotations: MutableSet, moshi: Moshi) : JsonAdapter<*>? { if (!annotations.isEmpty()) return null