Reports usages of pseudo-functional code if Java Stream API is available. Though guava Iterable API provides functionality similar to Java Streams API, it's slightly different and may miss some features. Especially, primitive-specialized stream variants like IntStream are more performant than generic variants.

Example:

List<String> transformedIterable = Iterables.transform(someList, someTransformFunction);//warning: Pseudo functional style code

After the quickfix the code would look like: List<String> transformedIterable = someList.stream().map(someTransformFunction).collect(Collectors.toList());


Note: code semantic could be changed e.g., guava's Iterable.transform produces lazy-evaluated iterable, but the replacement is eager-evaluated.

Use the table below to configure static method calls which should be translated to the stream API.

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