Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.
Browse files
Use Types.isSameType for comparing TypeMirrors.
The documentation on TypeMirror.equals states "Semantic comparisons of type equality should instead use Types.isSameType(TypeMirror, TypeMirror). The results of t1.equals(t2) and Types.isSameType(t1, t2) may differ.".
  • Loading branch information
JakeWharton committed Aug 26, 2014
1 parent b088b28 commit 61e471df3891cf017755998b83839042f8455c29
Showing 1 changed file with 1 addition and 1 deletion.
@@ -213,7 +213,7 @@ private Map<String, List<ExecutableElement>> providerMethodsByClass(RoundEnviron
TypeElement moduleType = (TypeElement) module;

// Verify that all modules do not extend from non-Object types.
if (!moduleType.getSuperclass().equals(objectType)) {
if (!types.isSameType(moduleType.getSuperclass(), objectType)) {
error("Modules must not extend from other classes: " + elementToString(module), module);

0 comments on commit 61e471d

Please sign in to comment.