mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] minor updates to inspection descriptions
GitOrigin-RevId: 2009b2e0f8c7d1c268466fdc78431914bc6d3084
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e39319e784
commit
2c90447e82
@@ -1,6 +1,8 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports sealed classes whose permits clauses do not contain some of the subclasses from the same file.
|
||||
Reports <code>sealed</code> classes without an explicit <code>permits</code> list.
|
||||
Sealed classes that only have subclasses in the same file are not required to have an explicit <code>permits</code> list.
|
||||
By default, this inspection does not highlight in the editor, but only provides a fix.
|
||||
<p>Example:</p>
|
||||
<pre><code>
|
||||
sealed class A {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports expressions with a repeating pattern which could be replaced with <i>Stream API</i> or <code>String.join()</code>.
|
||||
Reports expressions with a repeating pattern that could be replaced with <i>Stream API</i> or a <code>String.join()</code> call.
|
||||
<p>Example:</p>
|
||||
<pre><code>
|
||||
boolean allStartWith(String a, String b, String c, String d, String prefix) {
|
||||
|
||||
@@ -12,7 +12,7 @@ Reports usages of Guava's functional primitives that can be migrated to standard
|
||||
List<String> results = List.of(1, 2, 3).stream().map(Object::toString).collect(Collectors.toList());
|
||||
</code></pre>
|
||||
<p>
|
||||
The quick-fix may change the semantics. Some lazy-evaluated Guava's iterables can be transformed to eager-evaluated.
|
||||
The quick-fix may change the semantics. Some lazily evaluated Guava iterables can be transformed to eagerly evaluated.
|
||||
</p>
|
||||
<!-- tooltip end -->
|
||||
</body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports loops which can be collapsed into a single <code>Collection.removeIf</code> call.
|
||||
Reports loops which can be collapsed into a single <code>Collection.removeIf()</code> call.
|
||||
<p>Example:</p>
|
||||
<pre><code>
|
||||
for (Iterator<String> it = collection.iterator(); it.hasNext(); ) {
|
||||
|
||||
@@ -39,7 +39,7 @@ class Main implements Serializable {
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>For more information about all possible cases, refer the documentation for <code>java.io.Serial</code>.</p>
|
||||
<p>For more information about all possible cases, refer to the Javadoc of the <code>java.io.Serial</code> class.</p>
|
||||
<!-- tooltip end -->
|
||||
<p><small>New in 2020.3</small></p>
|
||||
</body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports <code>null</code> assigned to <code>Optional</code> variable or returned from method returning <code>Optional</code>.
|
||||
Reports <code>null</code> assigned to an <code>Optional</code> variable or returned from a method returning <code>Optional</code>.
|
||||
<p>It's recommended that you use <code>Optional.empty()</code> (or <code>Optional.absent()</code> for Guava) to denote an empty value.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports Stream API call chains ending with the <code>count()</code> operation that
|
||||
could be optimized.
|
||||
Reports Stream API call chains ending with a <code>count()</code> operation, that are optimizable.
|
||||
<p>
|
||||
The following call chains are replaced by this inspection:
|
||||
The following call chains can be replaced by this inspection:
|
||||
</p>
|
||||
<ul>
|
||||
<li><code>Collection.stream().count()</code> → <code>Collection.size()</code>. In Java 8 <code>Collection.stream().count()</code>
|
||||
|
||||
@@ -20,7 +20,7 @@ class Test implements Externalizable {
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>For information about all valid cases, refer the documentation for <code>java.io.Serial</code>.</p>
|
||||
<p>For information about all valid cases, refer to the Javadoc of the <code>java.io.Serial</code> class.</p>
|
||||
<!-- tooltip end -->
|
||||
<p><small>New in 2020.3</small></p>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user