Merge pull request #335 from square/eric.0724.null_kotlin

JsonAdapter.Factory.create rejects the null Type.
This commit is contained in:
Jake Wharton
2017-07-24 20:57:34 +01:00
committed by GitHub

View File

@@ -148,7 +148,7 @@ internal class KotlinJsonAdapter<T>(
} }
class KotlinJsonAdapterFactory : JsonAdapter.Factory { class KotlinJsonAdapterFactory : JsonAdapter.Factory {
override fun create(type: Type?, annotations: MutableSet<out Annotation>, moshi: Moshi) override fun create(type: Type, annotations: MutableSet<out Annotation>, moshi: Moshi)
: JsonAdapter<*>? { : JsonAdapter<*>? {
if (!annotations.isEmpty()) return null if (!annotations.isEmpty()) return null