Files
Bas Leijdekkersandintellij-monorepo-bot fdde91f28d Java: update inspection descriptions
GitOrigin-RevId: 829a5e8f0b97a4e21dbb1f7d99ba70b777d1240f
2025-04-12 16:28:13 +00:00

26 lines
577 B
HTML

<html>
<body>
Reports unnecessary cast expressions.
<p><b>Example:</b></p>
<pre><code>
static Object toObject(String s) {
return (Object) s;
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
static Object toObject(String s) {
return s;
}
</code></pre>
<!-- tooltip end -->
<p>
Use the checkbox below to ignore clarifying casts, for example casts in collection calls where <code>Object</code> is expected:
<pre><code>
static void removeFromList(List&lt;String&gt; l, Object o) {
l.remove((String)o);
}
</code></pre>
</body>
</html>