mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
19 lines
638 B
HTML
19 lines
638 B
HTML
<html>
|
|
<body>
|
|
Reports loops that can be replaced with <code>Arrays.setAll()</code> or <code>Arrays.fill()</code> calls.
|
|
<p>This inspection suggests replacing loops with <code>Arrays.setAll()</code> if the language level of the project or module is 8 or higher.
|
|
Replacing loops with <code>Arrays.fill()</code> is possible with any language level.</p>
|
|
<p>Example:</p>
|
|
<pre><code>
|
|
for (int i=0; i<array.length; i++) {
|
|
array[i] = calc(i);
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
Arrays.setAll(array, this::calc);
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2017.1</small></p>
|
|
</body>
|
|
</html> |