diff --git a/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java b/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java index 09430a8c9a7..5d552288976 100644 --- a/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java +++ b/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java @@ -109,7 +109,6 @@ import com.sun.tools.javac.code.Scope; import com.sun.tools.javac.code.Symbol; import com.sun.tools.javac.code.Symbol.ClassSymbol; -import com.sun.tools.javac.code.Symbol.CompletionFailure; import com.sun.tools.javac.code.Symbol.MethodSymbol; import com.sun.tools.javac.code.Symbol.PackageSymbol; import com.sun.tools.javac.code.Symbol.TypeSymbol; @@ -926,12 +925,6 @@ private static boolean isInherited(VisitorState state, Name annotationName) { if (annotationSym == null) { return false; } - try { - annotationSym.complete(); - } catch (CompletionFailure e) { - /* @Inherited won't work if the annotation isn't on the classpath, but we can still - check if it's present directly */ - } Symbol inheritedSym = state.getSymtab().inheritedType.tsym; return annotationSym.attribute(inheritedSym) != null; });