mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
19 lines
635 B
HTML
19 lines
635 B
HTML
<html>
|
|
<body>
|
|
Reports references to <code>static</code> methods and fields via a class instance rather than the class itself.
|
|
<p>Even though referring to static members via instance variables is allowed by The Java Language Specification,
|
|
this makes the code confusing as the reader may think that the result of the method depends on the instance.</p>
|
|
<p>The quick-fix replaces the instance variable with the class name.</p>
|
|
<p>Example:</p>
|
|
<pre><code>
|
|
String s1 = s.valueOf(0);
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
String s = String.valueOf(0);
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p>
|
|
|
|
</body>
|
|
</html> |