Guava's functional primitives can be replaced with Java
Reports usages of Guava's functional primitives that can be migrated to standard Java API calls.
For example, the inspection reports usages of classes and interfaces like FluentIterable
, Optional
, Function
, Predicate
, or Supplier
.
Example:
After the quick-fix is applied:
The quick-fix may change the semantics. Some lazy-evaluated Guava's iterables can be transformed to eager-evaluated.
This inspection only reports if the language level of the project or module is 8 or higher.
Inspection options
Option | Type | Default |
---|---|---|
Report variables | Checkbox | true |
Report method chains | Checkbox | true |
Report return types | Checkbox | true |
Erase @javax.annotations.Nullable from converted functions | Checkbox | true |
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |