Skip to content

Commit

Permalink
TypeParameterUnusedInFormals: Replace .bound by .getUpperBound()
Browse files Browse the repository at this point in the history
  • Loading branch information
don-vip committed Feb 11, 2019
1 parent a17a68e commit 1dcdb09
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public Description matchMethod(MethodTree tree, VisitorState state) {

// Ignore f-bounds.
// e.g.: <T extends Enum<T>> T unsafeEnumDeserializer();
if (retType.bound != null && TypeParameterFinder.visit(retType.bound).contains(retType.tsym)) {
if (retType.getUpperBound() != null && TypeParameterFinder.visit(retType.getUpperBound()).contains(retType.tsym)) {
return Description.NO_MATCH;
}

Expand Down Expand Up @@ -141,8 +141,8 @@ public Void visitTypeVar(Type.TypeVar type, Void unused) {
if (!seen.add(type.tsym)) {
return null;
}
if (type.bound != null) {
type.bound.accept(this, null);
if (type.getUpperBound() != null) {
type.getUpperBound().accept(this, null);
}
return null;
}
Expand Down

0 comments on commit 1dcdb09

Please sign in to comment.