Inspectopedia
 
2024.3

Excessive lambda usage

Warning
New
Last modified: 03 December 2024

Reports if a trivial lambda expression is used in cases in which there's an alternative method that behaves in the same way, but accepts a concrete value instead of a lambda.

This inspection helps simplify the code.

Example:

After the quick-fix is applied:

This inspection depends on the Java feature 'Lambda expressions', which is available since Java 8.

New in 2017.1