mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Java: inspection description clarification
GitOrigin-RevId: b14ee79a725c528f7f0405f1cd93cb4fc91cf326
This commit is contained in:
committed by
intellij-monorepo-bot
parent
65dfb9027f
commit
6de4875c54
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user