Files
openide/plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyListSetCanBeKeyedAccess.html
Aleksandra Zolushkina 8e3e4b13d6 Proofread Groovy inspections descriptions
GitOrigin-RevId: be5fa9dd54de020987e985a46fca821e34e425ec
2021-06-24 06:55:08 +00:00

21 lines
417 B
HTML

<html>
<body>
Reports calls to <code>java.util.List.set()</code> methods. Such calls could be replaced
by the shorter and clearer keyed access form.
<p><b>Example:</b></p>
<pre>
<code>
def list = ["foo"]
list.set(0, "bar") // list.set(0, "bar") could be replaced with list[0] = "bar"
</code>
</pre>
<p>After the quick-fix is applied:</p>
<pre>
<code>
def list = ["foo"]
list[0] = "bar"
</code>
</pre>
</body>
</html>