mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
27 lines
689 B
HTML
27 lines
689 B
HTML
<html>
|
|
<body>
|
|
Reports calls to <code>toString()</code> that use the default implementation
|
|
from <code>java.lang.Object</code>.
|
|
<p>The default implementation is rarely intended but may be used by accident.</p>
|
|
<p>
|
|
Calls to <code>toString()</code> on objects with <code>java.lang.Object</code>,
|
|
interface or abstract class type are ignored by this inspection.
|
|
</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Bar {
|
|
void foo1(Bar bar) {
|
|
String s = bar.toString(); // warning
|
|
/* ... */
|
|
}
|
|
|
|
void foo2(Object obj) {
|
|
String s = obj.toString(); // no warning here
|
|
/* ... */
|
|
}
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
|
|
</body>
|
|
</html> |