Java: inspection description clarification

GitOrigin-RevId: b14ee79a725c528f7f0405f1cd93cb4fc91cf326
This commit is contained in:
Bas Leijdekkers
2022-07-22 18:35:48 +00:00
committed by intellij-monorepo-bot
parent 65dfb9027f
commit 6de4875c54
2 changed files with 8 additions and 8 deletions
@@ -5,11 +5,11 @@ called on a value that is obviously non-null (for example, a newly created objec
a programming error.
<p><b>Example:</b></p>
<pre><code>
final String greeting = Objects.requireNonNull("Hi!");
final String greeting = Objects.requireNonNull("Hi!");
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
final String greeting = "Hi!";
final String greeting = "Hi!";
</code></pre>
<!-- tooltip end -->
<p>New in 2017.2</p>
@@ -1,13 +1,13 @@
<html>
<body>
Reports null checks that can be replaced with an <code>Objects</code>/<code>Stream</code> static method.
Reports null checks that can be replaced with a call to a static method from <code>Objects</code> or <code>Stream</code>.
<p><b>Example:</b></p>
<pre><code>
if (message == null) {
application.messageStorage().save(new EmptyMessage());
} else {
application.messageStorage().save(message);
}
if (message == null) {
application.messageStorage().save(new EmptyMessage());
} else {
application.messageStorage().save(message);
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>