Back to Intellij Community

UnqualifiedMethodAccess

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

2025.3-rc-2306 B
Original Source

Reports calls to non-static methods on the same instance that are not qualified with this.

Example:

class Foo {
    void bar() {}

    void foo() {
      bar();
    }
  }

After the quick-fix is applied:

class Foo {
    void bar() {}

    void foo() {
      this.bar();
    }
  }