mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Update dependency com.pinterest.ktlint:ktlint-cli to v1.2.0 (#1814)
* Update dependency com.pinterest.ktlint:ktlint-cli to v1.2.0 * Appease ktlint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jake Wharton <jw@squareup.com>
This commit is contained in:
@@ -104,7 +104,10 @@ internal class KotlinJsonAdapter<T>(
|
||||
if (values[i] === ABSENT_VALUE) {
|
||||
when {
|
||||
constructor.parameters[i].isOptional -> isFullInitialized = false
|
||||
constructor.parameters[i].type.isMarkedNullable -> values[i] = null // Replace absent with null.
|
||||
|
||||
// Replace absent with null.
|
||||
constructor.parameters[i].type.isMarkedNullable -> values[i] = null
|
||||
|
||||
else -> throw missingProperty(
|
||||
constructor.parameters[i].name,
|
||||
allBindings[i]?.jsonName,
|
||||
@@ -285,9 +288,11 @@ public class KotlinJsonAdapterFactory : JsonAdapter.Factory {
|
||||
property.returnType.javaType
|
||||
}
|
||||
}
|
||||
|
||||
is KTypeParameter -> {
|
||||
property.returnType.javaType
|
||||
}
|
||||
|
||||
else -> error("Not possible!")
|
||||
}
|
||||
val resolvedPropertyType = propertyType.resolve(type, rawType)
|
||||
|
Reference in New Issue
Block a user