mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 01:41:11 +07:00
GitOrigin-RevId: 829a5e8f0b97a4e21dbb1f7d99ba70b777d1240f
26 lines
577 B
HTML
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<String> l, Object o) {
|
|
l.remove((String)o);
|
|
}
|
|
</code></pre>
|
|
|
|
</body>
|
|
</html> |