mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
19 lines
815 B
HTML
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<String> 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<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 lazily evaluated Guava iterables can be transformed to eagerly evaluated.
|
|
</p>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |