mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
28 lines
1.0 KiB
HTML
28 lines
1.0 KiB
HTML
<html>
|
|
<body>
|
|
Reports logger fields that are not declared <code>static</code> and/or <code>final</code>.
|
|
Ensuring that every class logger is effectively constant and bound to that class
|
|
simplifies the task of providing a unified logging implementation for an application.
|
|
<p>A quick-fix is provided to change the logger modifiers to <code>static final</code>.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
<b>public class</b> Significant {
|
|
<b>private</b> Logger LOG = Logger.getLogger(Critical.class);
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
<b>public class</b> Significant {
|
|
<b>private static final</b> Logger LOG = Logger.getLogger(Critical.class);
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p>
|
|
Configure the inspection:
|
|
</p>
|
|
<ul>
|
|
<li>Use the <b>Logger class name</b> table to specify logger class names. The inspection will report the fields that are not <code>static</code> and <code>final</code> and are of the type equal to one of the specified class names.
|
|
</li>
|
|
</ul>
|
|
</body>
|
|
</html> |