Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Dec 12, 2021
1 parent 7505632 commit e5906f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion moshi/src/main/java/com/squareup/moshi/Types.java
Expand Up @@ -362,7 +362,7 @@ static Type[] mapKeyAndValueTypes(Type context, Class<?> contextRawType) {
static Type getSupertype(Type context, Class<?> contextRawType, Class<?> supertype) {
if (!supertype.isAssignableFrom(contextRawType)) throw new IllegalArgumentException();
return resolve(
getGenericSupertype(context, contextRawType, supertype), context, contextRawType);
getGenericSupertype(context, contextRawType, supertype), context, contextRawType);
}

static Type getGenericSuperclass(Type type) {
Expand Down
Expand Up @@ -23,8 +23,9 @@
import org.junit.Test;

/**
* Test fixes for infinite recursion on {@link Util#resolve(java.lang.reflect.Type, java.lang.reflect.Type, Class)}, described at <a href="https://github.com/google/gson/issues/440">Issue
* #440</a> and similar issues.
* Test fixes for infinite recursion on {@link Util#resolve(java.lang.reflect.Type,
* java.lang.reflect.Type, Class)}, described at <a
* href="https://github.com/google/gson/issues/440">Issue #440</a> and similar issues.
*
* <p>These tests originally caused {@link StackOverflowError} because of infinite recursion on
* attempts to resolve generics on types, with an intermediate types like 'Foo2&lt;? extends ? super
Expand Down

0 comments on commit e5906f1

Please sign in to comment.