Skip to content

Commit

Permalink
Add backreferences to b/216306810
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 424125774
  • Loading branch information
kluever authored and Error Prone Team committed Jan 25, 2022
1 parent 3f61879 commit d33ab70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public Description matchMethod(MethodTree tree, VisitorState state) {
.build();
}

// this code is stolen from MissingOverride.java
// TODO(b/216306810): copied from MissingOverride.java
private static boolean isEffectivelyOverride(Symbol sym, Types types) {
// static methods can't be overrides
if (sym.isStatic()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public Description matchMethod(MethodTree tree, VisitorState state) {
* Returns the {@link MethodSymbol} of the first method that sym overrides in its supertype
* closure, or {@code null} if no such method exists.
*/
// TODO(b/216306810): consider adding a generalized version of this to ASTHelpers
@Nullable
private MethodSymbol getFirstOverride(Symbol sym, Types types) {
ClassSymbol owner = sym.enclClass();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static boolean shouldApplyApiChecks(Tree tree, VisitorState state) {
return true;
}

// Copied from MissingOverride.java
// TODO(b/216306810): copied from MissingOverride.java
private static boolean isEffectivelyOverride(Symbol sym, Types types) {
// static methods can't be overrides
if (sym.isStatic()) {
Expand Down

0 comments on commit d33ab70

Please sign in to comment.