Skip to content

Commit

Permalink
MoreTypes.asWildcard() is not yet released in auto-common
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149591891
  • Loading branch information
ronshapiro committed Mar 9, 2017
1 parent 6afff2c commit 7968f7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion java/dagger/android/processor/AndroidMapKeyValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.type.WildcardType;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;
import javax.tools.Diagnostic.Kind;
Expand Down Expand Up @@ -97,7 +98,8 @@ private static TypeMirror mapKeyValue(Class<? extends Annotation> annotation, El
List<ExecutableElement> mapKeyMethods =
methodsIn(elements.getTypeElement(annotation.getCanonicalName()).getEnclosedElements());
TypeMirror returnType = getOnlyElement(mapKeyMethods).getReturnType();
return MoreTypes.asWildcard(getOnlyElement(MoreTypes.asDeclared(returnType).getTypeArguments()))
// TODO(ronshapiro): replace with MoreTypes.asWildcard() when auto-common 0.9 is released
return ((WildcardType) getOnlyElement(MoreTypes.asDeclared(returnType).getTypeArguments()))
.getExtendsBound();
}

Expand Down

0 comments on commit 7968f7a

Please sign in to comment.