mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
46 lines
1.0 KiB
HTML
46 lines
1.0 KiB
HTML
<html>
|
|
<body>
|
|
Reports unnecessary <code>super</code>
|
|
qualifiers in method calls and field references.
|
|
<p>
|
|
A <code>super</code> qualifier is unnecessary
|
|
when the field or method of the superclass is not hidden/overridden in the calling class.
|
|
</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Foo {
|
|
void foo() {}
|
|
}
|
|
|
|
class Bar extends Foo {
|
|
void bar() {
|
|
super.foo();
|
|
}
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
class Foo {
|
|
void foo() {}
|
|
}
|
|
|
|
class Bar extends Foo {
|
|
void bar() {
|
|
foo();
|
|
}
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p>
|
|
Use the inspection settings to ignore qualifiers that help to distinguish superclass members access
|
|
from the identically named members of the outer class.
|
|
<p>
|
|
<p>
|
|
See also the following inspections:
|
|
</p>
|
|
<ul>
|
|
<li><i>Java | Visibility | Access to inherited field looks like access to element from surrounding code</i></li>
|
|
<li><i>Java | Visibility | Call to inherited method looks like call to local method</i></li>
|
|
</ul>
|
|
</body>
|
|
</html> |