Files
openide/java/java-impl/resources/inspectionDescriptions/Guava.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
815 B
HTML

<html>
<body>
Reports usages of Guava's functional primitives that can be migrated to standard Java API calls.
<p>For example, the inspection reports usages of classes and interfaces like <code>FluentIterable</code>, <code>Optional</code>, <code>Function</code>,
<code>Predicate</code>, or <code>Supplier</code>.</p>
<p>Example:</p>
<pre><code>
ImmutableList&lt;String&gt; results = FluentIterable.from(List.of(1, 2, 3)).transform(Object::toString).toList();
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
List&lt;String&gt; results = List.of(1, 2, 3).stream().map(Object::toString).collect(Collectors.toList());
</code></pre>
<p>
The quick-fix may change the semantics. Some lazily evaluated Guava iterables can be transformed to eagerly evaluated.
</p>
<!-- tooltip end -->
</body>
</html>