mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
29 lines
580 B
HTML
29 lines
580 B
HTML
<html>
|
|
<body>
|
|
Reports fields explicitly initialized to their default values.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Foo {
|
|
int foo = 0;
|
|
List bar = null;
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
class Foo {
|
|
int foo;
|
|
List bar;
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p>
|
|
Use the inspection settings to only report explicit <code>null</code> initialization, for example:
|
|
</p>
|
|
<pre><code>
|
|
class Foo {
|
|
int foo = 0; // no warning
|
|
List bar = null; // redundant field initialization warning
|
|
}
|
|
</code></pre>
|
|
</body>
|
|
</html> |