Files
openide/java/java-impl/resources/inspectionDescriptions/SafeVarargsHasNoEffect.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

15 lines
479 B
HTML

<html>
<body>
Reports write operations inside <code>@SafeVarargs</code> methods where vararg parameter is reassigned to something else.
In this case, newly assigned array is not related to the variable arity arguments at the call site and might not be safe anymore.
<p><b>Example:</b></p>
<pre><code>
@SafeVarargs
public final &lt;T&gt; void test(T[] tt, T... t) {
t = tt;
System.out.println(t[0]);
}
</code></pre>
<!-- tooltip end -->
</body>
</html>