Groovy closures implicitly return the value of the last statement in them.
Example:
def foo = { return 1 }
After the quick-fix is applied:
def foo = { 1 }