mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
18 lines
607 B
HTML
18 lines
607 B
HTML
<html>
|
|
<body>
|
|
Reports suspicious usages of <code>Collection</code> or <code>Iterable</code> in vararg method calls.
|
|
<p>For example, in the following method:</p>
|
|
<pre><code>
|
|
<T> boolean contains(T needle, T... haystack) {...}
|
|
</code></pre>
|
|
<p>a call like</p>
|
|
<pre><code>
|
|
if(contains("item", listOfStrings)) {...}
|
|
</code></pre>
|
|
<p>looks suspicious as the list will be wrapped into a single element array.
|
|
Such code can be successfully compiled and will likely run without
|
|
exceptions, but it's probably used by mistake.</p>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2019.2</small></p>
|
|
</body>
|
|
</html> |