File: MissingOverride.md

package info (click to toggle)
error-prone-java 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,076 kB
  • sloc: java: 171,398; xml: 1,459; sh: 34; makefile: 7
file content (11 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
The [Google Java Style Guide ยง6.1][style] requires that a method is marked with
the `@Override` annotation whenever it is legal. This includes a class method
overriding a superclass method, a class method implementing an interface method,
and an interface method respecifying a superinterface method.

Exception: `@Override` may be omitted when the parent method is `@Deprecated`.
If the flag `-XepOpt:MissingOverride:IgnoreInterfaceOverrides=true` is used,
`@Override` can be omitted for an interface method respecifying a superinterface
method.

[style]: https://google.github.io/styleguide/javaguide.html#s6.1-override-annotation