Back to Intellij Community

UnnecessarySuperQualifier

java/java-impl/resources/inspectionDescriptions/UnnecessarySuperQualifier.html

2025.3-rc-2851 B
Original Source

Reports unnecessary super qualifiers in method calls and field references.

A super qualifier is unnecessary when the field or method of the superclass is not hidden/overridden in the calling class.

Example:

class Foo {
    void foo() {}
  }

  class Bar extends Foo {
    void bar() {
      super.foo();
    }
  }

After the quick-fix is applied:

class Foo {
    void foo() {}
  }

  class Bar extends Foo {
    void bar() {
      foo();
    }
  }

Use the inspection settings to ignore qualifiers that help to distinguish superclass members access from the identically named members of the outer class.

See also the following inspections:

  • Java | Visibility | Access to inherited field looks like access to element from surrounding code
  • Java | Visibility | Call to inherited method looks like call to local method