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

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>