Inspectopedia
 
2024.3

Object literal can be converted to lambda

Info
New
Last modified: 03 December 2024

Reports anonymous object literals implementing a Java interface with a single abstract method that can be converted into a call with a lambda expression.

Example:

After the quick-fix is applied: