Reports methods overriding superclass methods but are not annotated with @java.lang.Override.

Annotating methods with @java.lang.Override improves code readability since it shows the intent. In addition, the compiler emits an error when a signature of the overridden method doesn't match the superclass method.

Example:


    class X {
      public String toString() {
        return "hello world";
      }
    }
  

After the quick-fix is applied:


    class X {
      @Override
      public String toString() {
        return "hello world";
      }
    }
  

Configure the inspection:

This inspection only reports if the language level of the project or module is 5 or higher.