mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Convert Moshi.java to Kotlin (#1462)
* Rename .java to .kt * Migrate Moshi.java to Moshi.kt * Idiomatic cleanups * Move comments down * Apply suggestions from code review Co-authored-by: Egor Andreevich <egor@squareup.com> * Small little cleanups Co-authored-by: Egor Andreevich <egor@squareup.com>
This commit is contained in:
@@ -289,7 +289,7 @@ public class KotlinJsonAdapterFactory : JsonAdapter.Factory {
|
||||
else -> error("Not possible!")
|
||||
}
|
||||
val resolvedPropertyType = resolve(type, rawType, propertyType)
|
||||
val adapter = moshi.adapter<Any>(
|
||||
val adapter = moshi.adapter<Any?>(
|
||||
resolvedPropertyType,
|
||||
Util.jsonAnnotations(allAnnotations.toTypedArray()),
|
||||
property.name
|
||||
|
Reference in New Issue
Block a user