Reports usages of Guava's functional primitives which can be replaced with Java API. For example, inspection reports usages of classes and interfaces like FluentIterable, Optional, Function, Predicate, Supplier.

Example:

  ImmutableList<String> results = FluentIterable.from(List.of(1, 2, 3)).transform(Object::toString).toList();

After the quick-fix is applied the result looks like:

  List<String> results = List.of(1, 2, 3).stream().map(Object::toString).collect(Collectors.toList());

The quick-fix may change semantic. Some of lazy-evaluated guava's iterables could be transformed to eager-evaluated.

This inspection only reports if the language level of the project or module is 8 or higher.