Java: add example to inspection description

GitOrigin-RevId: 9a2f34b55223c90d4a2190fc5ac73578a0736708
This commit is contained in:
Bas Leijdekkers
2022-07-22 18:35:45 +00:00
committed by intellij-monorepo-bot
parent 16ba41674b
commit 65dfb9027f
@@ -1,8 +1,16 @@
<html>
<body>
Reports if a null-checking method (for example, <code>Objects.requireNonNull</code> or <code>Assert.assertNotNull</code>) is
called on the value that is obviously non-null (for example, a newly created object). Such a check is redundant and may indicate
called on a value that is obviously non-null (for example, a newly created object). Such a check is redundant and may indicate
a programming error.
<p><b>Example:</b></p>
<pre><code>
final String greeting = Objects.requireNonNull("Hi!");
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
final String greeting = "Hi!";
</code></pre>
<!-- tooltip end -->
<p>New in 2017.2</p>
</body>