Unnecessary qualifier for 'this' or 'super'
Reports unnecessary qualification of this
or super
.
Using a qualifier on this
or super
to disambiguate a code reference may easily become unnecessary via automatic refactorings and should be deleted for clarity.
Example:
class Foo {
void foo() {}
}
class Bar extends Foo {
void bar() {
Bar.super.foo();
}
}
After the quick-fix is applied:
class Foo {
void foo() {}
}
class Bar extends Foo {
void bar() {
super.foo();
}
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023