Skip to content

Commit

Permalink
Add an explanation for RedundantOverride check
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 419320271
  • Loading branch information
sumitbhagwani authored and Error Prone Team committed Jan 2, 2022
1 parent ca56726 commit 65eb009
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/bugpattern/RedundantOverride.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
An override of a method that delegates its implementation to the super method is
redudant, and can be removed.

For example, the `equals` method in the following class implementation can be
deleted.

```java
class Test {
@Override
public boolean equals(Object o) {
return super.equals(o);
}
}
```

0 comments on commit 65eb009

Please sign in to comment.