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

19 lines
805 B
HTML

<html>
<body>
Reports <code>assert</code> messages that are not of the <code>java.lang.String</code> type.
<p>Using a string provides more information to help diagnose the failure
or the assertion reason.</p>
<p><b>Example:</b></p>
<pre><code>
void foo(List&lt;Integer&gt; myList) {
assert myList.isEmpty() : false;
}
</code></pre>
<!-- tooltip end -->
<p>
Use the <b>Only warn when the <code>assert</code> message type is 'boolean' or 'java.lang.Boolean'</b> option to only warn when the <code>assert</code> message type is <code>boolean</code> or <code>java.lang.Boolean</code>.
A <code>boolean</code> detail message is unlikely to provide additional information about an assertion failure
and could result from a mistakenly entered <code>:</code> instead of <code>&</code>.
</body>
</html>