mirror of
https://github.com/fankes/moshi.git
synced 2025-10-20 08:29:22 +08:00
Merge pull request #493 from square/eric.never-type-equals
Fix type checks with custom adapters.
This commit is contained in:
@@ -45,7 +45,7 @@ public final class Util {
|
|||||||
|
|
||||||
public static boolean typesMatch(Type pattern, Type candidate) {
|
public static boolean typesMatch(Type pattern, Type candidate) {
|
||||||
// TODO: permit raw types (like Set.class) to match non-raw candidates (like Set<Long>).
|
// TODO: permit raw types (like Set.class) to match non-raw candidates (like Set<Long>).
|
||||||
return pattern.equals(candidate);
|
return Types.equals(pattern, candidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Set<? extends Annotation> jsonAnnotations(AnnotatedElement annotatedElement) {
|
public static Set<? extends Annotation> jsonAnnotations(AnnotatedElement annotatedElement) {
|
||||||
|
Reference in New Issue
Block a user