mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
34 lines
1.0 KiB
HTML
34 lines
1.0 KiB
HTML
<html>
|
|
<body>
|
|
Reports method parameters that always have the same constant value.
|
|
|
|
<p>Example:</p>
|
|
<pre><code>
|
|
static void printPoint(int x, int y) { // x is always 0
|
|
System.out.println(x + ", " + y);
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
printPoint(0, 1);
|
|
printPoint(0, 2);
|
|
}
|
|
</code></pre>
|
|
<p>The quick-fix inlines the constant value. This may simplify the method implementation.</p>
|
|
<!-- tooltip end -->
|
|
<p>
|
|
Use the <b>Ignore when a quick-fix can not be provided</b> option to suppress the inspections when:
|
|
</p>
|
|
<ul>
|
|
<li>the parameter is modified inside the method</li>
|
|
<li>the parameter value that is being passed is a reference to an inaccessible field (Java ony)</li>
|
|
<li>the parameter is a vararg (Java only)</li>
|
|
</ul>
|
|
<p>
|
|
Use the <b>Maximal method visibility</b> option to control the maximum visibility of methods to be reported.
|
|
</p>
|
|
<p>
|
|
Use the <b>Minimal method usage count to report parameter</b> field to specify the minimal number of method usages with the same parameter value.
|
|
</p>
|
|
</body>
|
|
</html>
|