Inspectopedia
 
2024.3

'return' statement can be implicit

Warning
Code Style
New
Last modified: 03 December 2024

Reports return statements at the end of closures which can be made implicit.

Groovy closures implicitly return the value of the last statement in them.

Example:

After the quick-fix is applied: