mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Merge pull request #475 from square/eric.resolve-generics
Resolve generic property types in KotlinJsonAdapter.
This commit is contained in:
@@ -373,7 +373,8 @@ public final class Types {
|
||||
return new Type[] { Object.class, Object.class };
|
||||
}
|
||||
|
||||
static Type resolve(Type context, Class<?> contextRawType, Type toResolve) {
|
||||
@CheckReturnValue // TODO(eric): Move this to internal Utils.
|
||||
public static Type resolve(Type context, Class<?> contextRawType, Type toResolve) {
|
||||
// This implementation is made a little more complicated in an attempt to avoid object-creation.
|
||||
while (true) {
|
||||
if (toResolve instanceof TypeVariable) {
|
||||
|
Reference in New Issue
Block a user