JsonAdapter.Factory.create rejects the null Type.

This fails already in Types.getRawType, but a compiler error is preferable.
This commit is contained in:
Eric Cochran
2017-07-24 11:06:22 -07:00
committed by GitHub
parent fdd38cddd8
commit 1340ef8935

View File

@@ -148,7 +148,7 @@ internal class KotlinJsonAdapter<T>(
}
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<*>? {
if (!annotations.isEmpty()) return null